diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/acme/acme.c | 3 | ||||
-rw-r--r-- | src/cmd/acme/dat.h | 1 | ||||
-rw-r--r-- | src/cmd/acme/exec.c | 10 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c index 740f3617..75745aff 100644 --- a/src/cmd/acme/acme.c +++ b/src/cmd/acme/acme.c @@ -133,6 +133,9 @@ threadmain(int argc, char *argv[]) cputype = getenv("cputype"); objtype = getenv("objtype"); home = getenv("HOME"); + acmeshell = getenv("acmeshell"); + if(acmeshell && *acmeshell == '\0') + acmeshell = nil; p = getenv("tabstop"); if(p != nil){ maxtab = strtoul(p, nil, 0); diff --git a/src/cmd/acme/dat.h b/src/cmd/acme/dat.h index 0539d1ac..72860db3 100644 --- a/src/cmd/acme/dat.h +++ b/src/cmd/acme/dat.h @@ -535,6 +535,7 @@ int fsyspid; char *cputype; char *objtype; char *home; +char *acmeshell; char *fontnames[2]; Image *tagcols[NCOL]; Image *textcols[NCOL]; diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c index 8262be4a..81a2fcd9 100644 --- a/src/cmd/acme/exec.c +++ b/src/cmd/acme/exec.c @@ -1358,6 +1358,7 @@ runproc(void *argvp) char *rcarg[4]; void **argv; CFsys *fs; + char *shell; threadsetname("runproc"); @@ -1467,6 +1468,8 @@ runproc(void *argvp) if(argaddr) putenv("acmeaddr", argaddr); + if(acmeshell != nil) + goto Hard; if(strlen(t) > sizeof buf-10) /* may need to print into stack */ goto Hard; inarg = FALSE; @@ -1576,7 +1579,10 @@ Hard: chdir(dir); /* ignore error: probably app. window */ free(dir); } - rcarg[0] = "rc"; + shell = acmeshell; + if(shell == nil) + shell = "rc"; + rcarg[0] = shell; rcarg[1] = "-c"; rcarg[2] = t; rcarg[3] = nil; @@ -1590,7 +1596,7 @@ Hard: sendul(cpid, ret); threadexits(nil); } - warning(nil, "exec rc: %r\n"); + warning(nil, "exec %s: %r\n", shell); Fail: /* threadexec hasn't happened, so send a zero */ |