diff --git a/conmon/conmon.c b/conmon/conmon.c index 9e8e6a5f..2a78c37d 100644 --- a/conmon/conmon.c +++ b/conmon/conmon.c @@ -1169,7 +1169,10 @@ int main(int argc, char *argv[]) /* Block for an initial write to the start pipe before spawning any childred or exiting, to ensure the parent can put us in the right cgroup. */ - read(start_pipe_fd, buf, BUF_SIZE); + num_read = read(start_pipe_fd, buf, BUF_SIZE); + if (num_read < 0) { + pexit("start-pipe read failed"); + } close(start_pipe_fd); }