Use gnulib set_cloexec_flag in a few places.

This commit is contained in:
Richard W.M. Jones
2017-03-03 14:16:22 +00:00
parent 58d6becc8a
commit e5474df1ac
3 changed files with 13 additions and 9 deletions

View File

@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include "cloexec.h"
#include "ignore-value.h"
#include "guestfs.h"
@@ -77,7 +78,7 @@ main (int argc, char *argv[])
/* Parent continues. */
close (pipefd[0]);
ignore_value (fcntl (pipefd[1], F_SETFD, FD_CLOEXEC));
ignore_value (set_cloexec_flag (pipefd[1], 1));
/* Sleep a bit and test that the guestunmount process is still running. */
sleep (2);