From 47e3d475df6244a48b73421cd4210b64c392df8d Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Tue, 19 Oct 2021 09:35:59 -0700 Subject: feat(rc): cleaner process watching for each job --- sys/cmd/rc/var.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/cmd/rc/var.c') diff --git a/sys/cmd/rc/var.c b/sys/cmd/rc/var.c index 7b5d75a..5e1e90c 100644 --- a/sys/cmd/rc/var.c +++ b/sys/cmd/rc/var.c @@ -159,7 +159,7 @@ globalvar(char *name) h = hash(name, arrlen(globals)); if(strcmp(name,"PATH")==0){ - flush(errio); + flush(shell.err); } for(v = globals[h]; v; v = v->link){ @@ -175,8 +175,8 @@ Var* var(char *name) { Var *v; - if(proc){ - for(v = proc->local; v; v=v->link) + if(runner){ + for(v = runner->local; v; v=v->link) if(strcmp(v->name, name) == 0) return v; } @@ -206,7 +206,7 @@ mkenv(void) nchr+=strlen(a->str)+1; \ } - for(v= proc->local; v; v=v->link){ + for(v= runner->local; v; v=v->link){ BODY } for(h=globals; h!=arrend(globals); h++){ @@ -238,7 +238,7 @@ mkenv(void) *p++='\0'; \ } - for(v=proc->local; v; v=v->link){ + for(v=runner->local; v; v=v->link){ BODY } for(h=globals; h!=arrend(globals); h++){ @@ -265,7 +265,7 @@ initpath(void) v = globalvar("PATH"); v->update = bigpath; - flush(errio); + flush(shell.err); bigpath(v); } -- cgit v1.2.1