in reply to linux perl - interrupted system calls not restarted?
As you said you need IO::Socket below:
Possibly IO::Socket gets irritated by some %SIG handlers (couldn't find anything on the quick in the source or docs though). 2 possible workarounds I currently see:
Seems a known issue: SOLVED: Re: TCP Client-Server: Server exits though it shouldn't loops forever, and retries accept in case of EINTR. But the loop in the reaper looks like it can stop early; and other syscalls may mess up the detection of EINTR, which seems quite far away from the interrupted syscall.
Maybe just retry accept() upto n times in a row if $client is false.
Note that's there's a small race of the parent running w/o SIG handler, and later children possibly running with it (if it's inheritable by fork; CHECKED: doesn't seem to be inherited)
Please also post your updated code when done, thanx, Peter
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: linux perl - interrupted system calls not restarted?
by flipper (Beadle) on Oct 22, 2009 at 14:27 UTC | |
|
Re^2: linux perl - interrupted system calls not restarted?
by flipper (Beadle) on Oct 22, 2009 at 13:39 UTC | |
by ikegami (Patriarch) on Oct 22, 2009 at 14:37 UTC |