[BusyBox 0000884]: Msh "job control" "fix" breaks system() function

bugs at busybox.net bugs at busybox.net
Thu May 25 16:42:06 UTC 2006


The following issue has been SUBMITTED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=884 
====================================================================== 
Reported By:                Alain137
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   884
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             05-25-2006 09:42 PDT
Last Modified:              05-25-2006 09:42 PDT
====================================================================== 
Summary:                    Msh "job control" "fix" breaks system() function
Description: 
>From 1.1.2 to 1.1.3, the following change was done:

--- busybox-1.1.2.orig/shell/msh.c      2006-03-22 22:16:21.000000000
+0100
+++ busybox-1.1.3.orig/shell/msh.c      2006-05-17 20:51:46.000000000
+0200
@@ -3026,6 +3026,10 @@
        if (resetsig) {
                signal(SIGINT, SIG_DFL);
                signal(SIGQUIT, SIG_DFL);
+       } else {
+               /* put non-interactive processes into a different process
group.
+                * we don't support jobs, but this is at least sane: see
Bug 659 */
+               setpgrp();
        }

        if (t->type == TPAREN)


Ok, so this may fix jobs, but it certainly breaks the system() function
that is used by various programs to spawn children via the shell. The
problem is that when msh invoked as sh -c "command", it also goes into
non-interactive mode, and changes the process group... with the result
that the spawned command may not read from the terminal!
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-25-06 09:42  Alain137       New Issue                                    
05-25-06 09:42  Alain137       Status                   new => assigned     
05-25-06 09:42  Alain137       Assigned To               => BusyBox         
======================================================================




More information about the busybox-cvs mailing list