summaryrefslogtreecommitdiff
path: root/acme/bin/win
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-03-07 20:06:55 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-03-07 20:06:55 +0100
commite1cdcfdb172071bafef18b1ac160138c97459b79 (patch)
treec203ebb30f9c9d997af0e7cda3d0da72897a47ef /acme/bin/win
parent022087cdcdd39e7904f6970b54152f4aa30fc071 (diff)
downloadplan9front-e1cdcfdb172071bafef18b1ac160138c97459b79.tar.xz
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.
Diffstat (limited to 'acme/bin/win')
-rwxr-xr-xacme/bin/win12
1 files changed, 12 insertions, 0 deletions
diff --git a/acme/bin/win b/acme/bin/win
new file mode 100755
index 000000000..165ec2499
--- /dev/null
+++ b/acme/bin/win
@@ -0,0 +1,12 @@
+#!/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 ''