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: fix a null dereference on out-of-memory
[minix.git]
/
lib
/
libc
/
gen
/
minix
/
wait.c
blob
2d639c8c2ecc4ea59a49f11c8889bfe4644b9423
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
(
wait
,
_wait
)
9
#endif
10
11
pid_t
wait
(
status
)
12
int
*
status
;
13
{
14
message m
;
15
16
if
(
_syscall
(
PM_PROC_NR
,
WAIT
, &
m
) <
0
)
return
(-
1
);
17
if
(
status
!=
0
) *
status
=
m
.
m2_i1
;
18
return
(
m
.
m_type
);
19
}