ref: 0e7f9e241586c40c1d88b387b706d12fc28e811f
parent: 158c8ac2d9d15242bb64e548c3ba7f1fc205e604
author: qwx <qwx@sciops.net>
date: Thu Nov 24 15:14:43 EST 2022
disable ^ command, this cannot work
--- a/cmd.c
+++ b/cmd.c
@@ -529,14 +529,6 @@
sysfatal("procexec: %r");
}
-static void
-wproc(void *)
-{
- close(epfd[0]);
- writebuf(epfd[1]);
- close(epfd[1]);
-}
-
static int
pipeline(char *arg, int rr, int wr)
{
@@ -546,10 +538,8 @@
sysfatal("pipe: %r");
if(procrfork(rc, arg, mainstacksize, RFFDG|RFNOTEG|RFNAMEG) < 0)
sysfatal("procrfork: %r");
- if(wr){
- if(procrfork(wproc, nil, mainstacksize, RFFDG) < 0)
- sysfatal("procrfork: %r");
- }
+ if(wr)
+ writebuf(epfd[1]);
close(epfd[1]);
if(rr){
if((c = readintochunks(epfd[0])) == nil){
@@ -575,9 +565,11 @@
}
static int
-pipethrough(char *arg)
+pipethrough(char *)
{
- return pipeline(arg, 1, 1);
+ werrstr("pipethrough disabled due to pebcak");
+ return -1;
+ //return pipeline(arg, 1, 1);
}
/* the entire string is treated as the filename, ie.