aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/exec.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-21 10:27:11 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-21 10:27:11 -0700
commit89e6da0a7cc2cd8551ae31ac623232a0ccce905d (patch)
tree26690759ff80b44da050824958fd70384e8725f0 /sys/cmd/rc/exec.c
parent7e1eaee616365799cfc4cc787fdaa9448958536b (diff)
feat(rc): vi mode fleshed out
Diffstat (limited to 'sys/cmd/rc/exec.c')
-rw-r--r--sys/cmd/rc/exec.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/cmd/rc/exec.c b/sys/cmd/rc/exec.c
index eede516..6d0c0a9 100644
--- a/sys/cmd/rc/exec.c
+++ b/sys/cmd/rc/exec.c
@@ -700,21 +700,23 @@ void
Xasync(void)
{
int pid;
+ /*
int null = open("/dev/null", 0);
if(!null){
Xerror("can not open /dev/null\n");
return;
}
+ */
switch(pid=fork()){
case -1:
- close(null);
+ // close(null);
Xerror("fork failed: try again");
break;
case 0: // child in background
initchild(runner,0);
- pushredir(Ropen, null, 0);
+ /* pushredir(Ropen, null, 0); */
run(runner->code.exe, runner->code.i+1, runner->local, 0);
runner->caller = nil;
@@ -723,7 +725,7 @@ Xasync(void)
default: // parent in foreground
initparent(runner,pid,1);
- close(null);
+ // close(null);
runner->code.i = runner->code.exe[runner->code.i].i; /* jump to end of async command */
/* don't wait: continue running */