mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
tar: remove /bin/ when invoking compressors
This commit is contained in:
parent
8c573cab68
commit
a0691bc460
1 changed files with 1 additions and 6 deletions
|
@ -179,7 +179,6 @@ static int
|
||||||
push(int fd, char *cmd, int input, Pushstate *ps)
|
push(int fd, char *cmd, int input, Pushstate *ps)
|
||||||
{
|
{
|
||||||
int nfd, pifds[2];
|
int nfd, pifds[2];
|
||||||
String *s;
|
|
||||||
|
|
||||||
ps->open = 0;
|
ps->open = 0;
|
||||||
ps->fd = fd;
|
ps->fd = fd;
|
||||||
|
@ -197,11 +196,7 @@ push(int fd, char *cmd, int input, Pushstate *ps)
|
||||||
dup(pifds[Rd], Stdin);
|
dup(pifds[Rd], Stdin);
|
||||||
close(pifds[input? Rd: Wr]);
|
close(pifds[input? Rd: Wr]);
|
||||||
dup(fd, (input? Stdin: Stdout));
|
dup(fd, (input? Stdin: Stdout));
|
||||||
s = s_new();
|
execl(cmd, cmd, nil);
|
||||||
if (cmd[0] != '/')
|
|
||||||
s_append(s, "/bin/");
|
|
||||||
s_append(s, cmd);
|
|
||||||
execl(s_to_c(s), cmd, nil);
|
|
||||||
sysfatal("can't exec %s: %r", cmd);
|
sysfatal("can't exec %s: %r", cmd);
|
||||||
default:
|
default:
|
||||||
nfd = pifds[input? Rd: Wr];
|
nfd = pifds[input? Rd: Wr];
|
||||||
|
|
Loading…
Reference in a new issue