Bug 13371 - Trap from .profile doesn't work
Summary: Trap from .profile doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.32.x
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-12 17:29 UTC by peter.vicman@gmail.com
Modified: 2020-12-13 16:09 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
.profile (219 bytes, text/plain)
2020-12-12 17:43 UTC, peter.vicman@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter.vicman@gmail.com 2020-12-12 17:29:56 UTC
I'm using trap for EXIT and SIGHUP in .profile file.
In trap function I save current folder to some file on a disk when terminal window is closed. And when new terminal is open I read this file and change folder to last one.
It works on 1.31.1 but not on 1.32.0.
I'm not sure if this working in previous release is just a coincidence or some change was commited lately to break the working.
Comment 1 peter.vicman@gmail.com 2020-12-12 17:43:11 UTC
Created attachment 8706 [details]
.profile
Comment 2 peter.vicman@gmail.com 2020-12-12 19:17:42 UTC
Seems the commit in question is
ash,hush: add comment about masked SIGCHLD, handle SIG_IGNed SIGHUP as in bash

https://git.busybox.net/busybox/commit/?id=23bc562a0556d1c0ddad4252fa8d46c863b5fa88
Comment 3 Denys Vlasenko 2020-12-13 15:37:33 UTC
Fixed in git.
Comment 4 peter.vicman@gmail.com 2020-12-13 16:09:48 UTC
Yes, fixed. Thank you.