Merge pull request #1371 from wking/respect-start-pipe-read-errors
conmon: Respect start-pipe read errors
This commit is contained in:
commit
0caee670a0
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue