From 47fbfdca3e43ae6a5abd004e277c6caf5c1103c0 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Fri, 1 Jul 2016 02:20:32 -0700 Subject: [PATCH] Add note about the zombie process --- share/functions/suspend.fish | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/share/functions/suspend.fish b/share/functions/suspend.fish index fd64bec24..257ba4fdb 100644 --- a/share/functions/suspend.fish +++ b/share/functions/suspend.fish @@ -2,13 +2,14 @@ function suspend -d "Suspend the current shell." if begin contains -- $argv --force or not status --is-interactive and not status --is-login 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 - printf " (or%s kill -CONT %d%s from another terminal)\n" (set_color --bold) %self (set_color normal) - else - echo + printf " (or%s kill -CONT %d%s from another terminal)" (set_color --bold) %self (set_color normal) 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 else echo 2>&1 "Refusing to suspend login shell."