in reply to Re^2: parallel process on remote machines,read results and hanle timeout of those process
in thread parallel process on remote machines,read results and hanle timeout of those process
EAGAIN means that whilst there is something available on the socket, hence select has given you it, that at the exact moment you tried to read it, something in the system or tcp stack was busy, and rather than block, it returns EAGAIN and lets you do something else in the mean time before trying again.
I agree with you that the retry logic in your code snippet is borked. It will only attempt one retry and will never do the usleep. What you choose to do about that is up to you. Personally, I think I'd probably omit the retry logic completely and just do the microsleep and loop back to the select; but you should probably consult someone with more *nix experience than me if that is your platform.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: parallel process on remote machines,read results and hanle timeout of those process
by x12345 (Novice) on Oct 31, 2014 at 15:36 UTC | |
by BrowserUk (Patriarch) on Oct 31, 2014 at 15:56 UTC | |
by x12345 (Novice) on Nov 04, 2014 at 16:12 UTC |