filter via shell pipeline

Instead of requiring an executable, allow building arbitrary shell
pipelines to filter filetypes through.
master
Grant Mathews 9 years ago committed by Markus Teich
parent 11f2c648eb
commit 54daf38b08

@ -152,8 +152,8 @@ filter(int fd, const char *cmd)
dup2(fds[1], 1);
close(fds[0]);
close(fds[1]);
execlp(cmd, cmd, (char *)0);
eprintf("execlp %s:", cmd);
execlp("sh", "sh", "-c", cmd, (char *)0);
eprintf("execlp sh -c '%s':", cmd);
}
close(fds[1]);
return fds[0];

Loading…
Cancel
Save