mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
parent
b7a0031174
commit
cc7618985a
@ -292,7 +292,7 @@ static bool run_internal_process(process_t *p, std::string outdata, std::string
|
||||
// If we have nothing to write we can elide the thread.
|
||||
// TODO: support eliding output to /dev/null.
|
||||
if (f->skip_out() && f->skip_err()) {
|
||||
f->internal_proc->mark_exited(proc_status_t::from_exit_code(EXIT_SUCCESS));
|
||||
f->internal_proc->mark_exited(p->status);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
5
tests/checks/exit-status-with-closing-stderr.fish
Normal file
5
tests/checks/exit-status-with-closing-stderr.fish
Normal file
@ -0,0 +1,5 @@
|
||||
# RUN: %fish %s
|
||||
argparse r-require= -- --require 2>/dev/null ; echo $status
|
||||
# CHECK: 2
|
||||
argparse r-require= -- --require 2>&- ; echo $status
|
||||
# CHECK: 2
|
Loading…
x
Reference in New Issue
Block a user