binutils-gdb/gdb/testsuite/gdb.hp/foll-vfork.c
1999-04-16 01:35:26 +00:00

16 lines
265 B
C

#include <stdio.h>
main ()
{
int pid;
pid = vfork ();
if (pid == 0) {
printf ("I'm the child!\n");
execlp ("gdb.hp/vforked-program", "gdb.hp/vforked-program", (char *)0);
}
else {
printf ("I'm the proud parent of child #%d!\n", pid);
}
}