Author: David Phillips <firstname.lastname@example.org>
Date: Fri, 11 Dec 2015 12:23:45 +1300
Change an eprintf to a die to stop child from running its own slideshow
The child thread was created because execlp will not return if successful.
The eprintf was placed after the call to execlp to catch any error, but the
child continued to return a (closed) fds, resulting in a second slideshow
being run by the child.
This commit fixes the issue by killing the child.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sent.c b/sent.c
@@ -153,7 +153,7 @@ filter(int fd, const char *cmd)
execlp("sh", "sh", "-c", cmd, (char *)0);
- eprintf("execlp sh -c '%s':", cmd);
+ die("execlp sh -c '%s':", cmd);