mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-29 06:01:16 -03:00
Switch wait command to use topics
Prior to this fix, the wait command used waitpid() directly. Switch it to calling process_mark_finished_children() along with the rest of the job machinery. This centralizes the waitpid call to a single location.
This commit is contained in:
@@ -983,13 +983,10 @@ void proc_pop_interactive() {
|
||||
if (is_interactive != old) signal_set_handlers();
|
||||
}
|
||||
|
||||
pid_t proc_wait_any() {
|
||||
int pid_status;
|
||||
pid_t pid = waitpid(-1, &pid_status, WUNTRACED);
|
||||
if (pid == -1) return -1;
|
||||
handle_child_status(pid, proc_status_t::from_waitpid(pid_status));
|
||||
void proc_wait_any() {
|
||||
ASSERT_IS_MAIN_THREAD();
|
||||
process_mark_finished_children(true /* block_ok */);
|
||||
process_clean_after_marking(is_interactive);
|
||||
return pid;
|
||||
}
|
||||
|
||||
void hup_background_jobs() {
|
||||
|
||||
Reference in New Issue
Block a user