Skip to content

Commit

Permalink
Ignore SIGTTIN and SIGTTOU coming from detached proxies.
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Nov 29, 2024
1 parent 01fcca2 commit 59f1b7e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2261,9 +2261,21 @@ static bool simulate_transient_error(Task* t) {
return true;
}

static bool ignore_signal_for_detached_proxy(int sig) {
switch (sig) {
case SIGSTOP:
case SIGCONT:
case SIGTTIN:
case SIGTTOU:
return true;
default:
return false;
}
}

bool Task::did_waitpid(WaitStatus status) {
if (is_detached_proxy() &&
(status.stop_sig() == SIGSTOP || status.stop_sig() == SIGCONT)) {
ignore_signal_for_detached_proxy(status.stop_sig())) {
LOG(debug) << "Task " << tid << " is a detached proxy, ignoring status " << status;
return true;
}
Expand Down

0 comments on commit 59f1b7e

Please sign in to comment.