shithub: mc

Download patch

ref: 5db2c35218596d6aac8410b3fc608471836607c3
parent: 3400b0428b9147012553c6f2280147d8dc99bbf1
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Oct 5 18:54:10 EDT 2015

We should use errno for errors, not int.

--- a/lib/std/spork.myr
+++ b/lib/std/spork.myr
@@ -40,8 +40,8 @@
 
 	pid = fork()
 	/* error  */
-	if pid == -1
-		-> `Fail -1
+	if pid < 0
+		-> `Fail pid castto(errno)
 	/* child */
 	elif pid == 0
 		/* stdin/stdout for our communication. */