diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 9ab6d23f..c7acd2e6 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "common.h" @@ -131,7 +132,9 @@ void start_child(char *command) { child_pid = 0; if (command != NULL) { int fd[2]; - pipe(fd); + if (pipe(fd) == -1) + err(EXIT_FAILURE, "pipe(fd)"); + child_pid = fork(); switch (child_pid) { case -1: