cmd/acme: removed obsolete PATH manipulation
This commit is contained in:
parent
66e9a1b676
commit
dc76580668
|
@ -1203,7 +1203,7 @@ runproc(void *argvp)
|
||||||
/* end of args */
|
/* end of args */
|
||||||
char *e, *t, *name, *filename, *dir, **av, *news;
|
char *e, *t, *name, *filename, *dir, **av, *news;
|
||||||
Rune r, **incl;
|
Rune r, **incl;
|
||||||
int ac, w, inarg, i, n, fd, nincl, winid;
|
int ac, w, inarg, i, n, nincl, winid;
|
||||||
int pipechar;
|
int pipechar;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
void **argv;
|
void **argv;
|
||||||
|
@ -1367,24 +1367,6 @@ runproc(void *argvp)
|
||||||
|
|
||||||
Hard:
|
Hard:
|
||||||
|
|
||||||
/*
|
|
||||||
* ugly: set PATH = (/cmd . $CPUTYPE)
|
|
||||||
* should honor $PATH if unusual.
|
|
||||||
*/
|
|
||||||
if(cputype){
|
|
||||||
n = 0;
|
|
||||||
memmove(buf+n, "/cmd:", 5);
|
|
||||||
n += 5;
|
|
||||||
memmove(buf+n, ".:", 2);
|
|
||||||
n += 2;
|
|
||||||
i = strlen(cputype)+1;
|
|
||||||
memmove(buf+n, cputype, i);
|
|
||||||
n += i;
|
|
||||||
fd = ocreate("/env/PATH", OWRITE, 0666);
|
|
||||||
write(fd, buf, n);
|
|
||||||
close(fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(arg){
|
if(arg){
|
||||||
news = emalloc(strlen(t) + 1 + 1 + strlen(arg) + 1 + 1);
|
news = emalloc(strlen(t) + 1 + 1 + strlen(arg) + 1 + 1);
|
||||||
if(news){
|
if(news){
|
||||||
|
|
Loading…
Reference in New Issue