Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190.
[oweals/busybox.git] / lash.c
diff --git a/lash.c b/lash.c
index e4ca5f67b9b5b9a5079b06664934686c2de879d4..7c932a91021fdb6c377dcd6449eb35f2af6783cf 100644 (file)
--- a/lash.c
+++ b/lash.c
@@ -319,8 +319,9 @@ static int builtin_fg_bg(struct child_prog *child)
        if ( (i=kill(- job->pgrp, SIGCONT)) < 0) {
                if (i == ESRCH) {
                        remove_job(&job_list, job);
+               } else {
+                       perror_msg("kill (SIGCONT)");
                }
-               perror_msg("kill (SIGCONT)");
        }
 
        return EXIT_SUCCESS;