int status;
int ret;
- ret = waitpid (0, &status, WNOHANG);
- if ( (0 == ret) ||
- ( (-1 == ret) &&
- (ECHILD == errno) ) )
+ GNUNET_assert (0 != proc);
+ ret = waitpid (proc, &status, WNOHANG);
+ if (0 == ret)
{
*type = GNUNET_OS_PROCESS_RUNNING;
*code = 0;