Introduction
Introduction Statistics Contact Development Disclaimer Help
Change an eprintf to a die to stop child from running its own slideshow - sent …
git clone git://git.suckless.org/sent
Log
Files
Refs
README
LICENSE
---
commit 022ae4836072e3534c5ce61d063179d6bab9d73a
parent 54daf38b08afee88829f24ca8d282557bbb627fe
Author: David Phillips <[email protected]>
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[0], resulting in a second slideshow
being run by the child.
This commit fixes the issue by killing the child.
Diffstat:
M sent.c | 2 +-
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)
close(fds[0]);
close(fds[1]);
execlp("sh", "sh", "-c", cmd, (char *)0);
- eprintf("execlp sh -c '%s':", cmd);
+ die("execlp sh -c '%s':", cmd);
}
close(fds[1]);
return fds[0];
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.