summaryrefslogtreecommitdiff
path: root/acme/bin/source/win/pipe.c
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/source/win/pipe.c
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/source/win/pipe.c')
-rw-r--r--acme/bin/source/win/pipe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/acme/bin/source/win/pipe.c b/acme/bin/source/win/pipe.c
index 280f726c9..cd8ecccfa 100644
--- a/acme/bin/source/win/pipe.c
+++ b/acme/bin/source/win/pipe.c
@@ -17,7 +17,7 @@ void pipectl(void*);
int pipefd;
Wpid *wpid;
-int snarffd;
+int snarffd = -1;
Channel *newpipechan;
int
@@ -70,7 +70,7 @@ pipecommand(Window *w, char *s)
if(q0 == q1){
t = nil;
k = 0;
- if(snarffd > 0){
+ if(snarffd >= 0){
seek(0, snarffd, 0);
for(;;){
t = realloc(t, k+8192+2);