summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-10-05 22:54:10 -0700
committerOri Bernstein <ori@eigenstate.org>2015-10-06 20:37:35 -0700
commit5db2c35218596d6aac8410b3fc608471836607c3 (patch)
treed77edd8ba5c7af37eb0028321b35ec0ec1d3cfb4
parent3400b0428b9147012553c6f2280147d8dc99bbf1 (diff)
downloadmc-5db2c35218596d6aac8410b3fc608471836607c3.tar.gz
We should use errno for errors, not int.
-rw-r--r--lib/std/spork.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/spork.myr b/lib/std/spork.myr
index 8143064..4ef525a 100644
--- a/lib/std/spork.myr
+++ b/lib/std/spork.myr
@@ -40,8 +40,8 @@ const sporkfd = {cmd, infd, outfd
pid = fork()
/* error */
- if pid == -1
- -> `Fail -1
+ if pid < 0
+ -> `Fail pid castto(errno)
/* child */
elif pid == 0
/* stdin/stdout for our communication. */