repo.or.cz
/
minix3.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
<sys/socket.h>: turn off MSG_NOSIGNAL
[minix3.git]
/
test
/
t60b.c
blob
637517f3184f65b707f6e56880b9ee63c1ce1b91
1
#include <sys/types.h>
2
#include <sys/wait.h>
3
#include <unistd.h>
4
#include <stdlib.h>
5
#include <stdio.h>
6
7
int
main
(
int
argc
,
char
**
argv
)
8
{
9
/* Return the tainted state of our child to our parent */
10
pid_t childpid
;
11
int
status
;
12
13
childpid
=
fork
();
14
if
(
childpid
== (
pid_t
) -
1
)
exit
(-
2
);
15
else if
(
childpid
==
0
) {
16
exit
(
issetugid
());
17
}
else
{
18
wait
(&
status
);
19
}
20
21
return
(
WEXITSTATUS
(
status
));
22
}
23