[BusyBox 0000659]: msh sends cntrl-C to background processes

bugs at busybox.net bugs at busybox.net
Fri May 5 18:39:38 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=659 
====================================================================== 
Reported By:                rgetz
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   659
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             01-25-2006 11:09 PST
Last Modified:              05-05-2006 11:39 PDT
====================================================================== 
Summary:                    msh sends cntrl-C to  background processes
Description: 
This bug was oringally reported as a bug in the signal handling code of
Blackfin's uClinux port:
http://blackfin.uclinux.org/tracker/index.php?func=detail&aid=1031&group_id=17&atid=141

but was tracked down to this:

In our system, when using busybox 1.0, when using the msh shell, we see
the following issue - CNTRL-C is sent to all processes started from the
same term (even in the process is run in the background with "&"). To
reproduce:

 > ping 127.0.0.1 &   [ starting ping in background ]
 > ping 127.0.0.1

CTRL-C

On Desktop bash, and busybox ash &lash - this stops the foreground ping,
and the one in the background keeps going.

In busybox msh and sash, background processes has the same PGID as TTY and
will be interrupted by "ctrl-c" since the kernel sends the signal to every
process with the same parent group IP number.

bash, ash, or lash assign a new group id to a background process. Most
implemented in this way:
setpgid(child->pid, newjob->progs[0].pid);
Which sets the new background process's pgid identical to its pid, which
make the process leader of a new process group, and will not be kill by
ctrl-c.

I verified on the busybox mailing list that this was infact a bug in msh,
and am posting it here.

-Robin
====================================================================== 

---------------------------------------------------------------------- 
 vapier - 05-05-06 11:39  
---------------------------------------------------------------------- 
should be fixed now in trunk and the 1.1 branch 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-25-06 11:09  rgetz          New Issue                                    
01-25-06 11:09  rgetz          Status                   new => assigned     
01-25-06 11:09  rgetz          Assigned To               => BusyBox         
05-05-06 11:39  vapier         Note Added: 0001347                          
05-05-06 11:39  vapier         Status                   assigned => closed  
05-05-06 11:39  vapier         Resolution               open => fixed       
======================================================================




More information about the busybox-cvs mailing list