shithub: mc

Download patch

ref: cad03a966cd487cf0b9bb24cb02b971337282911
parent: 8cc25499958961ae0a2afbe142b929f01cf34cbe
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Feb 13 16:58:41 EST 2017

There's nothing that can be done when exec fails.

--- a/lib/std/spork.myr
+++ b/lib/std/spork.myr
@@ -87,7 +87,7 @@
 }
 
 const sporkfd = {cmd, infds, outfds, errfds
-	var pid, err
+	var pid
 
 	pid = fork()
 	/* error  */
@@ -132,12 +132,9 @@
 		close(outfds[0])
 		close(errfds[0])
 
-		err = execvp(cmd[0], cmd)
-		if err != Enone
-			-> `Err err
-		;;
+		execvp(cmd[0], cmd)
 		/* if fork succeeds, we never return */
-		die("unreachable")
+		die("exec failed")
 	/* parent */
 	else
 		-> `Ok pid