[BusyBox 0001165]: bug in busybox sh version 1.1.2 and would like to know if it has been resolved in the latest version

bugs at busybox.net bugs at busybox.net
Wed Feb 13 18:11:07 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1165 
====================================================================== 
Reported By:                adrianh
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1165
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             01-18-2007 12:30 PST
Last Modified:              02-13-2008 10:11 PST
====================================================================== 
Summary:                    bug in busybox sh version 1.1.2 and would like to
know if it has been resolved in the latest version
Description: 
A signal will be caught once, but any signal following will not be
captured.  This can be seen by doing the following:

In BusyBox, make a file sleepTest.sh :
#!/bin/sh
sleeping=true
trap "echo got signal" USR1
for try in 1 2 3 4 5; do sleep 1; kill -USR1 $$; echo sent $try signal;
done&
sleep 10&
while $sleeping; do
        trap
        if wait %%; then
                echo sleep completed;
                sleeping=false;
        elif [ $? == 127 ]; then
                echo no sleep tonite;
                sleeping=false;
        else
                echo sleep interrupted;
        fi
done
#--- end of file ---

Make it executable and then execute it.

BusyBox 1.1.2 gave the following:
sent 1 signal
got signal
sleep interrupted
sent 2 signal
sent 3 signal
sent 4 signal
sent 5 signal
sleep completed

Correct result:
sent 1 signal
got signal
sleep interrupted
got signal
sent 2 signal
sleep interrupted
got signal
sleep interrupted
sent 3 signal
got signal
sleep interrupted
sent 4 signal
got signal
sent 5 signal
sleep interrupted
sleep completed

I've tried this on other Linux systems with success.  And it would make
sense, as one writing a signal handling shell script would probably want
more than one signal to be captured.
====================================================================== 

---------------------------------------------------------------------- 
 vda - 02-13-08 10:11  
---------------------------------------------------------------------- 
Fixed in svn. Your example is used for a testcase. Thanks! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-18-07 12:30  adrianh        New Issue                                    
01-18-07 12:30  adrianh        Status                   new => assigned     
01-18-07 12:30  adrianh        Assigned To               => BusyBox         
02-13-08 10:11  vda            Status                   assigned => closed  
02-13-08 10:11  vda            Note Added: 0004564                          
======================================================================




More information about the busybox-cvs mailing list