mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
Use gnulib set_cloexec_flag in a few places.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user