Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wait(2p)[^1] says > WEXITSTATUS(status) > If WIFEXITED(status) is true, evaluates to the low-order 8 bits > of the argument passed to _exit(2) or exit(3) by the child. meaning WEXITSTATUS(status) is an 8-bit value. We accidentally return too many bits. For example WEXITSTATUS(-1) returns -1 instead of 255. Fix it, matching the C library and our other WEXITSTATUS implementations. [^1] https://manpage.me/index.cgi?apropos=0&q=wait&sektion=2&manpath=FreeBSD+12-CURRENT+and+Ports&arch=default&format=html Originally reported at fish-shell/fish-shell#10919
- Loading branch information