plan9fox/acme/bin/win
cinap_lenrek e1cdcfdb17 acme: split win into winfs and rc script, get rid of lib9p leavefdsopen hack
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.
2020-03-07 20:06:55 +01:00

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 ''