shithub: mc

Download patch

ref: 61843c7772ad1dfb1a8688ac02a5d8153a8c25ca
parent: e44decfe88006cca2be018721175b60be6f7a76a
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
 		;;