in reply to Re: Reliable Timeout
in thread Reliable Timeout
So it's unreliable. alarm(2) doesn't interrupt blocking I/O on MSWin32, so 'timeout' won't do that either.
So that's new information, thanks, I only knew about problems coming from using alarm-based functions inside block - like using sleep...
So to conclude - general solution is the one I described initially, it has known deficences - namely problems with reliability ( thus, there are no solutions to my question about "reliable" way to do that ). On Unix you can expect lost signals, side effects from 'sleep' and 'alarm' used inside the block. On MS you can additionally expect haning on blocking I/O (which is what you're usually trying to detect with timeout).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reliable Timeout
by bluto (Curate) on Feb 15, 2005 at 19:06 UTC | |
by Eyck (Priest) on Feb 16, 2005 at 09:01 UTC | |
by bluto (Curate) on Feb 16, 2005 at 16:55 UTC |