e1cdcfdb17
split the acme win command into a winfs fileserver which handles /dev/cons emulation and a rc script responsible for launching the command. with these changes, the fd fiddling is not neccesary anymore and we can get rid of the leavefdsopen hack.
12 lines
206 B
Bash
Executable file
12 lines
206 B
Bash
Executable file
#!/bin/rc
|
|
if(~ $#* 0){
|
|
*=(rc -i)
|
|
}
|
|
/acme/bin/$cputype/winfs $1 >/dev/null >[2=1] || {
|
|
# compat
|
|
exec /acme/bin/$cputype/win $*
|
|
exit
|
|
}
|
|
echo dump $* > /dev/acme/ctl
|
|
</dev/cons >/dev/cons >[2=1] $*
|
|
exit ''
|