OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial revision
[pf3gnuchains/pf3gnuchains3x.git]
/
gdb
/
testsuite
/
gdb.hp
/
foll-fork.c
1
#include <stdio.h>
2
3
void callee (i)
4
int i;
5
{
6
printf("callee: %d\n", i);
7
}
8
9
main ()
10
{
11
int pid;
12
int v = 5;
13
14
pid = fork ();
15
if (pid == 0)
16
{
17
v++;
18
/* printf ("I'm the child!\n"); */
19
}
20
else
21
{
22
v--;
23
/* printf ("I'm the proud parent of child #%d!\n", pid); */
24
}
25
}