svn commit: [25884] trunk/busybox/shell

vapier at busybox.net vapier at busybox.net
Mon Mar 30 00:19:30 UTC 2009


Author: vapier
Date: 2009-03-30 00:19:30 +0000 (Mon, 30 Mar 2009)
New Revision: 25884

Log:
do not automatically display job information when the shell is not interactive

Modified:
   trunk/busybox/shell/hush.c


Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2009-03-29 23:49:46 UTC (rev 25883)
+++ trunk/busybox/shell/hush.c	2009-03-30 00:19:30 UTC (rev 25884)
@@ -2153,7 +2153,8 @@
 
 	/* 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 @@
 			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 {



More information about the busybox-cvs mailing list