Commits

Junio C Hamano  committed ce4f404 Merge

Merge branch 'js/run-command-updates' (early part)

* 'js/run-command-updates' (early part):
MinGW: truncate exit()'s argument to lowest 8 bits

  • Participants
  • Parent commits 0da3e1d, 47e3de0

Comments (0)

Files changed (2)

File compat/mingw.h

 	errno = EINVAL;
 	return -1;
 }
+/* bash cannot reliably detect negative return codes as failure */
+#define exit(code) exit((code) & 0xff)
 
 /*
  * simple adaptors
 
 	status = p->fn(argc, argv, prefix);
 	if (status)
-		return status & 0xff;
+		return status;
 
 	/* Somebody closed stdout? */
 	if (fstat(fileno(stdout), &st))