From 89e6da0a7cc2cd8551ae31ac623232a0ccce905d Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 21 Oct 2021 10:27:11 -0700 Subject: feat(rc): vi mode fleshed out --- sys/cmd/rc/exec.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/cmd/rc/exec.c') 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 */ -- cgit v1.2.1