sleep

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sleep

gunther_persoons
Hey,

I have a question about the usage of the sleep function  with fuse. When I tried
to use sleep(20) in the read function of hello.c. And then tried to read from it
2 times (the 2nd proces was started 10 sec later) the 1st proces would stop after
20 seconds but the 2nd proces would stop when the 1st process stopped thus after
10 seconds. Is this the right behaviour? If so why?

Thanks





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sleep

Miklos Szeredi
> I have a question about the usage of the sleep function with
> fuse. When I tried to use sleep(20) in the read function of
> hello.c. And then tried to read from it 2 times (the 2nd proces was
> started 10 sec later) the 1st proces would stop after 20 seconds but
> the 2nd proces would stop when the 1st process stopped thus after 10
> seconds. Is this the right behaviour? If so why?

Data from the first read is cached, and immediately returned to the
second read, once the first was completed.

You can try '-odirect_io' to make each read() start a new request.

Miklos


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Loading...