Bug 771

Summary: ash: HUP signal is ignored
Product: Busybox Reporter: Simon Kagstrom <simon.kagstrom>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.15.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: i686 Target: ARM
Build:
Attachments: patch (git format-patch)

Description Simon Kagstrom 2009-12-03 12:08:08 UTC
Created attachment 803 [details]
patch (git format-patch)

We noticed that ash would hang after quitting a telnet session (i.e., Ctrl-] and quit), busy looping on something and therefore using all CPU it could get. Exiting normally did not show this behavior.

It turns out that SIGHUP is ignored by ash, and this seems to be the reason behind the error. Doing

  kill -HUP $$

does nothing with busybox ash, whereas bash will exit if you do that. Further, doing e.g.,

  trap ls SIGHUP

is also non-functional (other signals will work as expected).


I've attached a patch which fixes the SIGHUP issues, although I'm unsure if it's the correct fix. I'm using 1.15.2 on ARM (but the issue seems general).
Comment 1 Simon Kagstrom 2009-12-03 14:45:19 UTC
I should add that this does not occur with busybox 1.7.2 which we ran before. We're using netkit telnet and busybox login.
Comment 2 Denys Vlasenko 2009-12-04 03:19:36 UTC
added patch to http://busybox.net/downloads/fixes-1.15.2/busybox-1.15.2-ash.patch
and committed to git. Thanks!
Comment 3 Denys Vlasenko 2009-12-13 00:13:26 UTC
Fixed in 1.15.3