diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-03 18:47:41 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-03 18:47:41 +0100 |
commit | 4661934e31d3eee9414eb44ffc5a7e355326bc31 (patch) | |
tree | a9b4bbcb3a85a89d1a5f8311c4d7e3afcaa776d2 /sys/src/ape/lib/ap/plan9/time.c | |
parent | 52b9a0689603622fe9f2b7610e428c125e4acbb7 (diff) |
ape: fix _grpmems(), access(), getppid(), cleanup
_grpmems() was broken tokenizing group list in place.
we have to copy it to status buffer before tokenizing.
dynamically alloc path for test file to check write
permission on directory and add pid to the name to
prevent races.
use _OPEN instead of ape open to read /dev/ppid in
getppid().
use mode enums instead of numeric constants for _OPEN()
and _CREATE().
Diffstat (limited to 'sys/src/ape/lib/ap/plan9/time.c')
-rw-r--r-- | sys/src/ape/lib/ap/plan9/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/ape/lib/ap/plan9/time.c b/sys/src/ape/lib/ap/plan9/time.c index 85a1e72b2..2a8463334 100644 --- a/sys/src/ape/lib/ap/plan9/time.c +++ b/sys/src/ape/lib/ap/plan9/time.c @@ -15,7 +15,7 @@ time(time_t *tp) time_t t; memset(b, 0, sizeof(b)); - f = _OPEN("/dev/time", 0); + f = _OPEN("/dev/time", OREAD); if(f >= 0) { _PREAD(f, b, sizeof(b), 0); _CLOSE(f); |