mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Add note about the zombie process
This commit is contained in:
parent
772e35562a
commit
47fbfdca3e
1 changed files with 6 additions and 5 deletions
|
@ -2,13 +2,14 @@ function suspend -d "Suspend the current shell."
|
||||||
if begin contains -- $argv --force
|
if begin contains -- $argv --force
|
||||||
or not status --is-interactive and not status --is-login
|
or not status --is-interactive and not status --is-login
|
||||||
end
|
end
|
||||||
printf "Suspending %d\n%s fg%s to resume" %self (set_color --bold) (set_color normal)
|
printf "Suspending %d: %sfg%s to resume" %self (set_color --bold) (set_color normal)
|
||||||
if contains -- $argv --force
|
if contains -- $argv --force
|
||||||
printf " (or%s kill -CONT %d%s from another terminal)\n" (set_color --bold) %self (set_color normal)
|
printf " (or%s kill -CONT %d%s from another terminal)" (set_color --bold) %self (set_color normal)
|
||||||
else
|
|
||||||
echo
|
|
||||||
end
|
end
|
||||||
|
# XXX not sure if this echo should be necessary, but without it, it seems
|
||||||
|
# everything printf'd above will not get pushed back to stdout before the suspend
|
||||||
|
echo ""
|
||||||
|
# XXX there always causes a zombie until one fg's when we do this:
|
||||||
kill -STOP %self
|
kill -STOP %self
|
||||||
else
|
else
|
||||||
echo 2>&1 "Refusing to suspend login shell."
|
echo 2>&1 "Refusing to suspend login shell."
|
||||||
|
|
Loading…
Reference in a new issue