BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004324 [BusyBox] Standards Compliance major always 07-25-08 10:03 09-20-08 09:23
Reporter corp186 View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0004324: Busybox ASH cannot trap
Description The following script hangs up with
 kill -HUP %1
from the current shellm but not
with
 kill -HUP <processid> from another shell.

Without the trap, it does react to signals
from another shell, but of course it does not run
the signal handler.

This is a bug, right? Is there any way to make
the script handle a signla sent from another shell>


#!/bin/sh

cleanup ()
{
    echo "cleaning"
}
trap cleanup HUP

echo "sleeping "
sleep 100000
echo "done"
Additional Information This is basically reopening bug 0000994. The submitted was on the right track but forgot an important piece of the puzzle. When vda ran the test script, everything seemed fine. This is probably because when vda ran it, /bin/sh was symlinked to /bin/busybox.

If you execute the script from within ASH with /bin/sh symlinked to busybox (for ASH), you can reproduce the issue of the trap not working.
Attached Files  busybox-1.11.1-ash.patch [^] (1,768 bytes) 07-26-08 06:49

- Relationships

- Notes
(0009994)
vda
07-25-08 17:06

I do not see it hanging, the background process seems to be successfully killed:

# ./ash
/.1/usr/srcdevel/bbox/fix/busybox.t1 # ./ash testcase.sh &
sleeping, pid 8809
/.1/usr/srcdevel/bbox/fix/busybox.t1 # kill -HUP %1
[1] + Done ./ash testcase.sh
/.1/usr/srcdevel/bbox/fix/busybox.t1 #

Can you explain more precisely your testcase?
 
(0010004)
corp186
07-25-08 18:13

The test case does exit, but it obviously isn't calling the trap handler cleanup() or it would print out "cleaning". Of course, maybe it could be calling it but the echo isn't coming through or other some such, but one way or another it's not working quite right.
 
(0010014)
vda
07-26-08 06:49

Try busybox-1.11.1-ash.patch attached to this bug.
 
(0011734)
vda
09-20-08 09:23

Assumed fixed (no feedback from bug submitter)
 

- Issue History
Date Modified Username Field Change
07-25-08 10:03 corp186 New Issue
07-25-08 10:03 corp186 Status new => assigned
07-25-08 10:03 corp186 Assigned To  => BusyBox
07-25-08 17:06 vda Note Added: 0009994
07-25-08 18:13 corp186 Note Added: 0010004
07-26-08 06:49 vda File Added: busybox-1.11.1-ash.patch
07-26-08 06:49 vda Note Added: 0010014
09-20-08 09:23 vda Status assigned => closed
09-20-08 09:23 vda Note Added: 0011734
09-20-08 09:23 vda Resolution open => fixed
09-20-08 09:23 vda Fixed in Version  => svn


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker