Re: Problems with ForkedProcess::waitForChild()

2005-03-05 Thread Angus Leeming
Andreas Vox wrote: > which ends in: > > int ForkedProcess::waitForChild() > { > // We'll pretend that the child returns 1 on all error conditions. > retval_ = 1; > int status; > bool wait = true; > while (wait) { > pid_t waitrpid = waitpid(pid_, &status, WUNTRACED); >

Re: Problems with ForkedProcess::waitForChild()

2005-03-04 Thread Andreas Vox
Angus Leeming <[EMAIL PROTECTED]> writes: > > ECHILD suggests that the zombie has been reaped already by a previous > invocation of waitpid. Are you invoking waitpid yourself? (Don't do that.) Nope, I just do: int SnippetConversion::startAndWait(...) { command_ = prepareCommand(...);

Re: Problems with ForkedProcess::waitForChild()

2005-03-04 Thread Angus Leeming
Andreas Vox wrote: > Hi! > > I wanted to check if the bitmap creation has finished without error > and found out that startScript always returns '1'. > > Apparently waitpid() always returns -1 with errno = ECHILD. > Is this a race condition in that the childprocess has finished before > waitpid(

Problems with ForkedProcess::waitForChild()

2005-03-04 Thread Andreas Vox
Hi! I wanted to check if the bitmap creation has finished without error and found out that startScript always returns '1'. Apparently waitpid() always returns -1 with errno = ECHILD. Is this a race condition in that the childprocess has finished before waitpid() is called? If so, the scheduling on