summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-02-15 11:19:03 -0800
committerOri Bernstein <ori@markovcorp.com>2018-02-15 11:19:03 -0800
commit9cb3a0f22ac95f75e87e944b95b6c5a13a4eb729 (patch)
tree282316079fa9f4f5f5d1864fb0747c08f3400fc8 /support
parentf8b121ae9b3e57bbca8304676d417f680ad26f7a (diff)
downloadmc-9cb3a0f22ac95f75e87e944b95b6c5a13a4eb729.tar.gz
Be a bit better about cleaning up fds on error.
Diffstat (limited to 'support')
-rw-r--r--support/syscall-gen/specials+linux-x64.frag4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/syscall-gen/specials+linux-x64.frag b/support/syscall-gen/specials+linux-x64.frag
index d279af7..de2ce27 100644
--- a/support/syscall-gen/specials+linux-x64.frag
+++ b/support/syscall-gen/specials+linux-x64.frag
@@ -19,7 +19,7 @@ extern const fnclone : ( flags : cloneopt, \
fn : void# /* we need a raw pointer */ \
-> pid)
const wait4 : (pid:pid, loc:int32#, opt : int64, usage:rusage# -> int64)
-const waitpid : (pid:pid, loc:int32#, opt : int64 -> int64)
+const waitpid : (pid:pid, loc:int32#, opt : int64 -> pid)
const execv : (cmd : byte[:], args : byte[:][:] -> int64)
const execve : (cmd : byte[:], args : byte[:][:], env : byte[:][:] -> int64)
/* wrappers to extract wait status */
@@ -119,7 +119,7 @@ const clone = {flags, stk, ptid, ctid, ptreg; -> (syscall(Sysclone, a(flags), a(
const wait4 = {pid, loc, opt, usage; -> syscall(Syswait4, a(pid), a(loc), a(opt), a(usage))}
const waitpid = {pid, loc, opt;
var rusage
- -> wait4(pid, loc, opt, &rusage)
+ -> (wait4(pid, loc, opt, &rusage) : pid)
}
const execv = {cmd, args