summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMike Frysinger2009-03-30 00:19:30 +0000
committerMike Frysinger2009-03-30 00:19:30 +0000
commit87824e0e50df1a09832bb3063a808b0a12f10d22 (patch)
tree5ce469f4a18bc7a9a7aec8563092a9e746da28fd /shell
parent681a4b7f067ae12b1e61cd1916893db79067126e (diff)
downloadbusybox-87824e0e50df1a09832bb3063a808b0a12f10d22.zip
busybox-87824e0e50df1a09832bb3063a808b0a12f10d22.tar.gz
do not automatically display job information when the shell is not interactive
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 17673c0..8f99b59 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2153,7 +2153,8 @@ static void insert_bg_job(struct pipe *pi)
/* We don't wait for background thejobs to return -- append it
to the list of backgrounded thejobs and leave it alone */
- printf("[%d] %d %s\n", thejob->jobid, thejob->cmds[0].pid, thejob->cmdtext);
+ if (G.interactive_fd)
+ printf("[%d] %d %s\n", thejob->jobid, thejob->cmds[0].pid, thejob->cmdtext);
G.last_bg_pid = thejob->cmds[0].pid;
G.last_jobid = thejob->jobid;
}
@@ -2284,8 +2285,9 @@ static int checkjobs(struct pipe* fg_pipe)
pi->cmds[i].pid = 0;
pi->alive_cmds--;
if (!pi->alive_cmds) {
- printf(JOB_STATUS_FORMAT, pi->jobid,
- "Done", pi->cmdtext);
+ if (G.interactive_fd)
+ printf(JOB_STATUS_FORMAT, pi->jobid,
+ "Done", pi->cmdtext);
delete_finished_bg_job(pi);
}
} else {