mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 20:54:40 +08:00
exec: Don't format status returned directly from builtin function
The builtin function returns the raw status, which is not the same as the integer return by waitpid. Therefore, the WIF macros shouldn't be used for checking or obtaining the status. This bug can be seen by executing (eval false). The builtin eval function returns 1, but proc_format_status misinterprets it as a signal by checking WIFSIGNALED, so adds 128 to the status to return 129. Signed-off-by: Grissiom <chaos.proton@gmail.com>
This commit is contained in:
parent
9f3a4d1640
commit
364d3dbbf8
Loading…
Reference in New Issue
Block a user