mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:17:44 +00:00
Shell: Use existing job state when waitpid() returns 0 in jobs
This commit is contained in:
parent
e3fd914187
commit
50f5959996
1 changed files with 4 additions and 3 deletions
|
@ -48,9 +48,10 @@ bool Job::print_status(PrintStatusMode mode)
|
||||||
|
|
||||||
if (WIFSIGNALED(wstatus))
|
if (WIFSIGNALED(wstatus))
|
||||||
status = "signaled";
|
status = "signaled";
|
||||||
} else if (rc < 0) {
|
} else {
|
||||||
// We couldn't waitpid() it, probably because we're not the parent shell.
|
// if rc < 0, We couldn't waitpid() it, probably because we're not the parent shell.
|
||||||
// just use the old information.
|
// Otherwise, the information we have is already correct,
|
||||||
|
// so just use the old information.
|
||||||
if (exited())
|
if (exited())
|
||||||
status = "exited";
|
status = "exited";
|
||||||
else if (m_is_suspended)
|
else if (m_is_suspended)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue