repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gdb6
/
gdb
/
testsuite
/
gdb.base
/
foll-vfork.c
blob
3c7fab573fa70fe768fc5b5fa79ad49bd1f0e192
1
#include <stdio.h>
2
#include <unistd.h>
3
4
#ifdef PROTOTYPES
5
int
main
(
void
)
6
#else
7
main
()
8
#endif
9
{
10
int
pid
;
11
12
pid
=
vfork
();
13
if
(
pid
==
0
) {
14
printf
(
"I'm the child!
\n
"
);
15
execlp
(
"gdb.base/vforked-prog"
,
"gdb.base/vforked-prog"
, (
char
*)
0
);
16
}
17
else
{
18
printf
(
"I'm the proud parent of child #%d!
\n
"
,
pid
);
19
}
20
}