diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-09 00:59:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-09 00:59:32 -0700 |
commit | ce4f404c6f059abb4988f4549c6e46a3ba0d56ec (patch) | |
tree | 40ca33a90fb2c0ea0092a5571517cc681bae1945 | |
parent | 0da3e1d21f931aef887ff30b2ebf171e3f343ff7 (diff) | |
parent | 47e3de0e7968a4176e2c54a36b214d3e7b24ad15 (diff) | |
download | git-ce4f404c6f059abb4988f4549c6e46a3ba0d56ec.tar.gz |
Merge branch 'js/run-command-updates' (early part)
* 'js/run-command-updates' (early part):
MinGW: truncate exit()'s argument to lowest 8 bits
-rw-r--r-- | compat/mingw.h | 2 | ||||
-rw-r--r-- | git.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index 4f7ba4c13f..c1859c5480 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -92,6 +92,8 @@ static inline int fcntl(int fd, int cmd, long arg) errno = EINVAL; return -1; } +/* bash cannot reliably detect negative return codes as failure */ +#define exit(code) exit((code) & 0xff) /* * simple adaptors @@ -245,7 +245,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv) status = p->fn(argc, argv, prefix); if (status) - return status & 0xff; + return status; /* Somebody closed stdout? */ if (fstat(fileno(stdout), &st)) |