Bug 771 - ash: HUP signal is ignored
Summary: ash: HUP signal is ignored
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.15.x
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-03 12:08 UTC by Simon Kagstrom
Modified: 2009-12-13 00:13 UTC (History)
1 user (show)

See Also:
Host: i686
Target: ARM
Build:


Attachments
patch (git format-patch) (724 bytes, patch)
2009-12-03 12:08 UTC, Simon Kagstrom
Details

Note You need to log in before you can comment on or make changes to this bug.
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