Merge branch 'js/run-command-updates' (early part)
* 'js/run-command-updates' (early part): MinGW: truncate exit()'s argument to lowest 8 bits
This commit is contained in:
commit
ce4f404c6f
@ -92,6 +92,8 @@ static inline int fcntl(int fd, int cmd, long arg)
|
|||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
/* bash cannot reliably detect negative return codes as failure */
|
||||||
|
#define exit(code) exit((code) & 0xff)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* simple adaptors
|
* simple adaptors
|
||||||
|
2
git.c
2
git.c
@ -245,7 +245,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
|
|||||||
|
|
||||||
status = p->fn(argc, argv, prefix);
|
status = p->fn(argc, argv, prefix);
|
||||||
if (status)
|
if (status)
|
||||||
return status & 0xff;
|
return status;
|
||||||
|
|
||||||
/* Somebody closed stdout? */
|
/* Somebody closed stdout? */
|
||||||
if (fstat(fileno(stdout), &st))
|
if (fstat(fileno(stdout), &st))
|
||||||
|
Loading…
Reference in New Issue
Block a user