ref: 95d4d77544f1ea32ecbef832d9b962ebb7a950c2
parent: fe3234f963250b77948413467eb6910fd016b28e
author: Ori Bernstein <[email protected]>
date: Thu Jan 1 09:48:03 EST 2015
Fix up wait on plan9 to check for empty exit status. Checking if it's there isn't quite good enough.
--- a/libstd/wait+plan9.myr
+++ b/libstd/wait+plan9.myr
@@ -71,10 +71,10 @@
match intparse(sp[0])
| `Some pid:
xpid = pid
- if sp.len == 5 /* we have a status */
- st = `Wfailure
- elif sp.len == 4 /* we exited with nil */
+ if sp.len == 4 || (sp.len == 5 && sp[4].len > 0) /* we exited with nil */
st = `Wsuccess
+ elif sp.len == 5 /* we have a status */
+ st = `Wfailure
else /* we have a malformed await message */
st = `Waiterror
;;