waitpid and strace -f

From: Alexander V. Lukyanov (lav@long.yar.ru)
Date: Sun Jan 30 2000 - 19:23:01 EST


The following program receives ECHILD for waitpid when it is run with
`strace -f'. WNOHANG and `-f' are required. I'm not sure if it is
kernel or strace problem. kernel 2.2.14, glibc-2.1.2-11,
strace-3.99.1-2, i686.

#include <sys/types.h>
#include <sys/wait.h>

int main()
{
   int st;
   int pid;
   pid=fork();
   if(pid==0)
      _exit(0);
   if(waitpid(pid,&st,WNOHANG)==-1)
      perror("waitpid");
   return 0;
}

   Alexander.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:26 EST