|
From: Jeremy F. <je...@go...> - 2003-10-21 17:03:50
|
On Tue, 2003-10-21 at 04:57, Tom Hughes wrote: > In message <yek...@au...> > Tom Hughes <th...@cy...> wrote: > > > My real problem seems to be that the waitpid is sometimes returning a > > nonsense error of -512 at the system call level. I've written a little > > test program, which is attached, and when it is run under valgrind > > this is what I see: > > So the -512 is actually ERESTARTSYS but that shouldn't be making it > back to my program - either the system call should be restarted for me > or I should get EINTR back. > > Bizarrely if I install a signal handler for SIGCHLD then although > valgrind still shows ERESTARTSYS as the result of the wait4 system > call the waitpid library routine gives me a zero result, without it > having restarted the system call. > > Without the signal handler I get ERESTARTSYS back from the waitpid > library routine. Hm, yes, you shouldn't be seeing that. Can you send me your code (or ideally, carve out a minimal piece which shows the problem)? Which kernel are you using again? J |