mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-13 21:32:23 +03:00
stage-1-init: fix PID 1 shell
The PID 1 shell is executed as the last command in a sh invocation. Some shells implicitly use exec for that, but the current busybox ash does not, so the shell gets a wrong PID. Spell out the exec.
This commit is contained in:
parent
92f3ec3ba5
commit
0fe9d58e4e
@ -36,7 +36,7 @@ EOF
|
||||
read reply
|
||||
|
||||
if [ -n "$allowShell" -a "$reply" = f ]; then
|
||||
exec setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console"
|
||||
exec setsid @shell@ -c "exec @shell@ < /dev/$console >/dev/$console 2>/dev/$console"
|
||||
elif [ -n "$allowShell" -a "$reply" = i ]; then
|
||||
echo "Starting interactive shell..."
|
||||
setsid @shell@ -c "@shell@ < /dev/$console >/dev/$console 2>/dev/$console" || fail
|
||||
|
Loading…
Reference in New Issue
Block a user