mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 14:40:37 +08:00
Pass final Fish exit status to fish_exit event
For fish_exit to be a suitable replacement for --on-process-exit, we need to be able to provide scripts with access to the shell's final exit code.
This commit is contained in:
parent
896d6f41f4
commit
d776a366fa
|
@ -440,7 +440,10 @@ int main(int argc, char **argv) {
|
|||
// TODO: The generic process-exit event is useless and unused.
|
||||
// Remove this in future.
|
||||
proc_fire_event(L"PROCESS_EXIT", EVENT_EXIT, getpid(), exit_status);
|
||||
event_fire_generic(L"fish_exit");
|
||||
|
||||
// Trigger any exit handlers.
|
||||
wcstring_list_t event_args = {to_string<int>(exit_status)};
|
||||
event_fire_generic(L"fish_exit", &event_args);
|
||||
|
||||
restore_term_mode();
|
||||
restore_term_foreground_process_group();
|
||||
|
|
Loading…
Reference in New Issue
Block a user