parent
c4c5113fbd
commit
4dec55eead
4 changed files with 21 additions and 49 deletions
|
|
@ -1,5 +1,3 @@
|
|||
int extpipeactive = 0;
|
||||
|
||||
void
|
||||
#if EXTERNALPIPEIN_PATCH
|
||||
extpipe(const Arg *arg, int in)
|
||||
|
|
@ -64,7 +62,6 @@ externalpipe(const Arg *arg)
|
|||
close(to[1]);
|
||||
/* restore */
|
||||
signal(SIGPIPE, oldsigpipe);
|
||||
extpipeactive = 1;
|
||||
}
|
||||
|
||||
#if EXTERNALPIPEIN_PATCH
|
||||
|
|
|
|||
|
|
@ -40,7 +40,5 @@ newterm(const Arg* a)
|
|||
default:
|
||||
exit(0);
|
||||
}
|
||||
default:
|
||||
wait(NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
#include <sys/wait.h>
|
||||
|
||||
void
|
||||
plumb(char *sel) {
|
||||
plumb(char *sel)
|
||||
{
|
||||
if (sel == NULL)
|
||||
return;
|
||||
|
||||
char cwd[PATH_MAX];
|
||||
pid_t child;
|
||||
|
||||
if (subprocwd(cwd) != 0)
|
||||
return;
|
||||
|
||||
switch(child = fork()) {
|
||||
switch (child = fork()) {
|
||||
case -1:
|
||||
return;
|
||||
case 0:
|
||||
|
|
@ -18,7 +21,5 @@ plumb(char *sel) {
|
|||
if (execvp(plumb_cmd, (char *const []){plumb_cmd, sel, 0}) == -1)
|
||||
exit(1);
|
||||
exit(0);
|
||||
default:
|
||||
waitpid(child, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue