diff options
author | Grant Mathews <grant.m.mathews@gmail.com> | 2015-12-09 20:56:07 -0800 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2015-12-24 01:51:29 +0100 |
commit | 54daf38b08afee88829f24ca8d282557bbb627fe (patch) | |
tree | c554c5e724301386877f35b178da48f111c02036 /sent.c | |
parent | 11f2c648eb1849976fddf57af8b66fcc43d425dc (diff) |
filter via shell pipeline
Instead of requiring an executable, allow building arbitrary shell
pipelines to filter filetypes through.
Diffstat (limited to 'sent.c')
-rw-r--r-- | sent.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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]; |