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.
https://dl.dropboxusercontent.com/u/70170658/ubcd/busybox-bug-7526-initrd.xz
(In reply to comment #0) > Expected result: > > ^C+ exec /bin/sh > ~ # > Correction.
(In reply to comment #0) > Expected result: > > ^C+ exec /bin/sh > ~ # > Update. I am also satisfied if the shell running "/runonce" just terminates because of SIGINT, and let "/sbin/init" respawn it on tty1. And by the way, my "/bin/sh" points to "/bin/busybox" and it's always BusyBox ash.