mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-05 01:55:21 +03:00
Shell: Use existing job state when waitpid() returns 0 in jobs
This commit is contained in:
parent
e3fd914187
commit
50f5959996
Notes:
sideshowbarker
2024-07-18 20:56:04 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/50f59599968 Pull-request: https://github.com/SerenityOS/serenity/pull/6021
@ -48,9 +48,10 @@ bool Job::print_status(PrintStatusMode mode)
|
||||
|
||||
if (WIFSIGNALED(wstatus))
|
||||
status = "signaled";
|
||||
} else if (rc < 0) {
|
||||
// We couldn't waitpid() it, probably because we're not the parent shell.
|
||||
// just use the old information.
|
||||
} else {
|
||||
// if rc < 0, We couldn't waitpid() it, probably because we're not the parent shell.
|
||||
// Otherwise, the information we have is already correct,
|
||||
// so just use the old information.
|
||||
if (exited())
|
||||
status = "exited";
|
||||
else if (m_is_suspended)
|
||||
|
Loading…
Reference in New Issue
Block a user