[Bug 7526] New: "exec /bin/sh" when ^C from an interactive shell script with "set -m"
bugzilla at busybox.net
bugzilla at busybox.net
Wed Oct 8 08:40:37 UTC 2014
https://bugs.busybox.net/show_bug.cgi?id=7526
Summary: "exec /bin/sh" when ^C from an interactive shell
script with "set -m"
Product: Busybox
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: Explorer09 at gmail.com
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
I cannot reproduce this bug in my Ubuntu host system, but it happens when I
test my initramfs image for this project
(https://github.com/Explorer09/cpustress-ubcd). So I have tried my best to
narrow down the problem and report here.
1. Download the attached initrd.xz
2. Boot it with a Linux kernel from a Linux distro. For example in GRUB:
linux (hd0,msdos1)/boot/vmlinuz-3.13.0-36-generic quiet
initrd (hd0,msdos1)/home/username/initrd.xz
boot
3. This initrd.xz will start a "/runonce" script that calls "/test.sh" and you
will see this:
+ echo In /runonce
In /runonce
+ /test.sh
+ echo In /test.sh
In /test.sh
+ echo Press Ctrl+C now.
Press Ctrl+C now.
+ read REPLY
4. Press Ctrl+C. Actual result:
^C+ exec /bin/sh
(And it freezes here without any shell prompt.)
Expected result:
^C+ exec /bin/sh
~ #
I also tested that, when I remove 'set -m' from the content of "test.sh",
things will work as expected.
--
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