Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gdb6 / gdb / testsuite / gdb.base / foll-fork.c
blob841258f147ca5c4665b5877cdb6030d9540b5e0e
1 #include <stdio.h>
2 #include <unistd.h>
4 #ifdef PROTOTYPES
5 void callee (int i)
6 #else
7 void callee (i)
8 int i;
9 #endif
11 printf("callee: %d\n", i);
14 #ifdef PROTOTYPES
15 int main (void)
16 #else
17 main ()
18 #endif
20 int pid;
21 int v = 5;
23 pid = fork ();
24 if (pid == 0)
26 v++;
27 /* printf ("I'm the child!\n"); */
29 else
31 v--;
32 /* printf ("I'm the proud parent of child #%d!\n", pid); */