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
libutil: add O_NOCTTY back to old pty open code
[minix.git]
/
lib
/
libminlib
/
getngid.c
blob
60b9ac094d80cf3db7567c9dab9ea2ded1c2f2f5
1
#include <lib.h>
2
#include <unistd.h>
3
4
gid_t
getngid
(
endpoint_t proc_ep
)
5
{
6
message m
;
7
m
.
m1_i1
=
proc_ep
;
/* search gid for this process */
8
if
(
_syscall
(
PM_PROC_NR
,
GETEPINFO
, &
m
) <
0
)
return
( (
gid_t
) -
1
);
9
return
( (
gid_t
)
m
.
m2_i2
);
/* return search result */
10
}