make job control work in console shell
This commit is contained in:
parent
382128b6cf
commit
e518ab667b
1 changed files with 15 additions and 7 deletions
|
@ -81,14 +81,22 @@ let
|
||||||
};
|
};
|
||||||
getty = dir {
|
getty = dir {
|
||||||
run = {
|
run = {
|
||||||
|
# We can't run a useful shell on /dev/console because
|
||||||
|
# /dev/console is not allowed to be the controlling
|
||||||
|
# tty of any process, which means ^C ^Z etc don't work.
|
||||||
|
# So we work out what the *actual* console device is
|
||||||
|
# using sysfs and open our shell there instead.
|
||||||
file = ''
|
file = ''
|
||||||
#!${execline}/bin/execlineb -P
|
#!${execline}/bin/execlineb -P
|
||||||
${execline}/bin/redirfd -w 2 /dev/console
|
${execline}/bin/cd /
|
||||||
${execline}/bin/fdmove -c 1 2
|
redirfd -r 0 /sys/devices/virtual/tty/console/active
|
||||||
${execline}/bin/redirfd -r 0 /dev/console
|
withstdinas CONSOLETTY
|
||||||
${execline}/bin/cd /
|
importas CONSOLETTY CONSOLETTY
|
||||||
/bin/ash -l
|
redirfd -w 2 /dev/''${CONSOLETTY}
|
||||||
'';
|
fdmove -c 1 2
|
||||||
|
redirfd -r 0 /dev/''${CONSOLETTY}
|
||||||
|
/bin/ash -l
|
||||||
|
'';
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
};
|
};
|
||||||
down-signal = {
|
down-signal = {
|
||||||
|
|
Loading…
Reference in a new issue