mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
Clear signals after running initial commands
If you run an initial command via `fish -c`, and that command is cancelled e.g. via control-C, then ensure that the cancellation signal is cleared before running config files. Fixes #9024
This commit is contained in:
@@ -13,6 +13,7 @@ Scripting improvements
|
|||||||
|
|
||||||
Interactive improvements
|
Interactive improvements
|
||||||
------------------------
|
------------------------
|
||||||
|
- Cancelling an initial command via control-C no longer prevents configuration scripts from running (:issue:`9024`).
|
||||||
|
|
||||||
New or improved bindings
|
New or improved bindings
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -545,6 +545,9 @@ int main(int argc, char **argv) {
|
|||||||
res = run_command_list(parser, opts.postconfig_cmds, {});
|
res = run_command_list(parser, opts.postconfig_cmds, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear signals in case we were interrupted (#9024).
|
||||||
|
signal_clear_cancel();
|
||||||
|
|
||||||
if (!opts.batch_cmds.empty()) {
|
if (!opts.batch_cmds.empty()) {
|
||||||
// Run the commands specified as arguments, if any.
|
// Run the commands specified as arguments, if any.
|
||||||
if (get_login()) {
|
if (get_login()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user