lkml.org 
[lkml]   [2000]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectwaitpid and strace -f
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.038 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site