aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-04-22 14:47:11 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-05-03 15:46:08 +0400
commit89810e10eda30501906421a23b4f1e6c330924ac (patch)
tree3be8f2345b64988e9cb1020fa113e79d9e73776d /tests/unit
parented78331ddafeca55f45ce9ce8bec6c7660a6d621 (diff)
tests: replace pipe() with g_unix_open_pipe(CLOEXEC)
Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test-io-channel-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test-io-channel-file.c b/tests/unit/test-io-channel-file.c
index 29038e67b6..1977006ce9 100644
--- a/tests/unit/test-io-channel-file.c
+++ b/tests/unit/test-io-channel-file.c
@@ -109,7 +109,7 @@ static void test_io_channel_pipe(bool async)
QIOChannelTest *test;
int fd[2];
- if (pipe(fd) < 0) {
+ if (!g_unix_open_pipe(fd, FD_CLOEXEC, NULL)) {
perror("pipe");
abort();
}