diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-03-30 00:19:30 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-03-30 00:19:30 +0000 |
commit | 87824e0e50df1a09832bb3063a808b0a12f10d22 (patch) | |
tree | 5ce469f4a18bc7a9a7aec8563092a9e746da28fd | |
parent | 681a4b7f067ae12b1e61cd1916893db79067126e (diff) | |
download | busybox-w32-87824e0e50df1a09832bb3063a808b0a12f10d22.tar.gz busybox-w32-87824e0e50df1a09832bb3063a808b0a12f10d22.tar.bz2 busybox-w32-87824e0e50df1a09832bb3063a808b0a12f10d22.zip |
do not automatically display job information when the shell is not interactive
-rw-r--r-- | shell/hush.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/hush.c b/shell/hush.c index 17673c0cb..8f99b59d3 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2153,7 +2153,8 @@ static void insert_bg_job(struct pipe *pi) | |||
2153 | 2153 | ||
2154 | /* We don't wait for background thejobs to return -- append it | 2154 | /* We don't wait for background thejobs to return -- append it |
2155 | to the list of backgrounded thejobs and leave it alone */ | 2155 | to the list of backgrounded thejobs and leave it alone */ |
2156 | printf("[%d] %d %s\n", thejob->jobid, thejob->cmds[0].pid, thejob->cmdtext); | 2156 | if (G.interactive_fd) |
2157 | printf("[%d] %d %s\n", thejob->jobid, thejob->cmds[0].pid, thejob->cmdtext); | ||
2157 | G.last_bg_pid = thejob->cmds[0].pid; | 2158 | G.last_bg_pid = thejob->cmds[0].pid; |
2158 | G.last_jobid = thejob->jobid; | 2159 | G.last_jobid = thejob->jobid; |
2159 | } | 2160 | } |
@@ -2284,8 +2285,9 @@ static int checkjobs(struct pipe* fg_pipe) | |||
2284 | pi->cmds[i].pid = 0; | 2285 | pi->cmds[i].pid = 0; |
2285 | pi->alive_cmds--; | 2286 | pi->alive_cmds--; |
2286 | if (!pi->alive_cmds) { | 2287 | if (!pi->alive_cmds) { |
2287 | printf(JOB_STATUS_FORMAT, pi->jobid, | 2288 | if (G.interactive_fd) |
2288 | "Done", pi->cmdtext); | 2289 | printf(JOB_STATUS_FORMAT, pi->jobid, |
2290 | "Done", pi->cmdtext); | ||
2289 | delete_finished_bg_job(pi); | 2291 | delete_finished_bg_job(pi); |
2290 | } | 2292 | } |
2291 | } else { | 2293 | } else { |