waitpid and strace -f

Alexander V. Lukyanov lav en long.yar.ru
Dom Ene 30 19:03:42 CST 2000


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 en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda