Programming and posix getting started
Manuals
Brands
HP Manuals
Software
MPE/iX 6.5 Operating System
21
22
23
24
25
26
27
28
29
30
21
Process Mana
gement
-
fork
- 1
•
pid
_t fork(void);
if ( (
p
i
d
= fork()) < 0)
perror
("fork");
else if (
pid
== 0) /* child
*/
{
printf
(“
c
hi
ld: here
\n”
);
}
else /*
pid
> 0
*
/ /*
par
ent
*
/
{
printf
(“
parent: here
\n”
);
}
1
...
...
19
20
21
22
23
...
...
42