[Bug 189] New: ash behaves strangely on CTRL-C (does not exit but fills process table)

bugzilla at busybox.net bugzilla at busybox.net
Tue Mar 17 15:26:01 UTC 2009


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

           Summary: ash behaves strangely on CTRL-C (does not exit but fills
                    process table)
           Product: Busybox
           Version: 1.13.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P3
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: ronald.wahl at raritan.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


Hi,
the below script behaves strangely when CTRL-C is pressed. Each CTRL-C doubles
the running subshells(?). Pressing CTRL-C longer (1-2 secs) will quickly make
small devices unusable (fork failed etc.). When registering a trap handler
everything is fine but I think the default handler for SIGINT should just abort
the whole script. See:

$ /home/rwa/busybox-1.13.3/ash script.sh

(other term) $ ps ax|grep script.sh
3896 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh

$ /home/rwa/busybox-1.13.3/ash script.sh
^C

(other term) $ ps ax|grep script.sh
3896 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh
3930 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh

$ /home/rwa/busybox-1.13.3/ash script.sh
^C^C

(other term) $ ps ax|grep test
3896 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh
3930 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh
4627 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh
4628 pts/7    S+     0:00 /home/rwa/busybox-1.13.3/ash script.sh

The script:

func () {
    sleep 1
}

while (true); do
    func
done


-- 
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