mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
Shell: Avoid waiting for jobs that were *just* unblocked
This fixes the issue with C-z not suspending the job on the first try. ...and further signal issues when the suspended job is contiued.
This commit is contained in:
parent
46661f02c6
commit
dc62371439
4 changed files with 14 additions and 4 deletions
|
@ -93,6 +93,7 @@ int Shell::builtin_bg(int argc, const char** argv)
|
|||
}
|
||||
|
||||
job->set_running_in_background(true);
|
||||
job->set_is_suspended(false);
|
||||
|
||||
dbg() << "Resuming " << job->pid() << " (" << job->cmd() << ")";
|
||||
fprintf(stderr, "Resuming job %" PRIu64 " - %s\n", job->job_id(), job->cmd().characters());
|
||||
|
@ -339,6 +340,7 @@ int Shell::builtin_fg(int argc, const char** argv)
|
|||
}
|
||||
|
||||
job->set_running_in_background(false);
|
||||
job->set_is_suspended(false);
|
||||
|
||||
dbg() << "Resuming " << job->pid() << " (" << job->cmd() << ")";
|
||||
fprintf(stderr, "Resuming job %" PRIu64 " - %s\n", job->job_id(), job->cmd().characters());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue