[Bug 1969] New: Ash trap command causes current running commands to return immediately

bugzilla at busybox.net bugzilla at busybox.net
Mon Jun 7 18:06:01 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=1969

           Summary: Ash trap command causes current running commands to
                    return immediately
           Product: Busybox
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: busybox at jakemagee.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


OVERVIEW:
When using traps in Ash scripts, currently running commands return immediately
when the trap signal is sent.

On an Ubuntu system running Bash, the trap is executed when the currently
running command has completed.  This is the expected execution according to
section 12.2.2 of the Bash Guide for Beginners
(http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html).

STEPS TO REPRODUCE:
The following code is an example:
#!/bin/sh

trap 'echo jake' SIGUSR1

while true
do

        echo "before sleep"
        sleep 5
        echo "after sleep"
done

ACTUAL RESULTS:
trap immediately interrupts the currently running process (echo "jake").

EXPECTED RESULTS:
trap is pending until the 5 second sleep is done.

PLATFORM:
Using BusyBox 1.11.2 on a PowerPC Linux (OpenWRT 8.01) system.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list