[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
Thu Jan 18 20:30:33 UTC 2007
The following issue has been SUBMITTED.
======================================================================
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: assigned
======================================================================
Date Submitted: 01-18-2007 12:30 PST
Last Modified: 01-18-2007 12:30 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.
======================================================================
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
======================================================================
More information about the busybox-cvs
mailing list