repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
VM: simplify slab allocator
[minix.git]
/
lib
/
libc
/
gen
/
minix
/
waitpid.c
blob
6972e6820b7c07715c1742da3d6422c67a932445
1
#include <sys/cdefs.h>
2
#include <lib.h>
3
#include
"namespace.h"
4
5
#include <sys/wait.h>
6
7
#ifdef __weak_alias
8
__weak_alias
(
waitpid
,
_waitpid
)
9
#endif
10
11
pid_t
waitpid
(
pid
,
status
,
options
)
12
pid_t pid
;
13
int
*
status
;
14
int
options
;
15
{
16
message m
;
17
18
m
.
m1_i1
=
pid
;
19
m
.
m1_i2
=
options
;
20
if
(
_syscall
(
PM_PROC_NR
,
WAITPID
, &
m
) <
0
)
return
(-
1
);
21
if
(
status
!=
0
) *
status
=
m
.
m2_i1
;
22
return
m
.
m_type
;
23
}