mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
fixup! Fix assertion failure on job redirection error
This commit is contained in:
@@ -1049,7 +1049,7 @@ bool exec_job(parser_t &parser, const shared_ptr<job_t> &j, const io_chain_t &bl
|
||||
// If exec_error then a backgrounded job would have been terminated before it was ever assigned
|
||||
// a pgroup, so error out before setting last_pid.
|
||||
auto pgid = j->get_pgid();
|
||||
if (j->is_foreground() && pgid.has_value()) {
|
||||
if (!j->is_foreground() && pgid.has_value()) {
|
||||
parser.vars().set_one(L"last_pid", ENV_GLOBAL, to_string(*pgid));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user