blob: c7e6cd329096aca0501d9acf237edcb99d3c1781 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#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);
}
}
|