mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
Base status -b off the parser execution stack
Instead of globally marking the state as "in block" when evaluating blocks/functions, update the "in block" status when pushing/popping blocks on the parser stack. Fixes #1729. On a side note, `status -b` is actually pretty useless, because it always returns 0 inside of a function (even without this patch).
This commit is contained in:
4
exec.cpp
4
exec.cpp
@@ -525,9 +525,6 @@ static void internal_exec_helper(parser_t &parser,
|
||||
return;
|
||||
}
|
||||
|
||||
int is_block_old=is_block;
|
||||
is_block=1;
|
||||
|
||||
signal_unblock();
|
||||
|
||||
if (node_offset == NODE_OFFSET_INVALID)
|
||||
@@ -544,7 +541,6 @@ static void internal_exec_helper(parser_t &parser,
|
||||
morphed_chain.clear();
|
||||
io_cleanup_fds(opened_fds);
|
||||
job_reap(0);
|
||||
is_block=is_block_old;
|
||||
}
|
||||
|
||||
/* Returns whether we can use posix spawn for a given process in a given job.
|
||||
|
||||
Reference in New Issue
Block a user