[gnome-keyring/wip/fork-fixes: 2/6] main: check return value of g_unix_open_pipe()



commit 30142ffb455bacc7567747e4db0e639f28d25777
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Oct 16 11:31:11 2015 -0700

    main: check return value of g_unix_open_pipe()

 daemon/gkd-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index f5da8bc..0d637f3 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -661,7 +661,8 @@ fork_and_print_environment (void)
        pid_t pid;
        int wakeup_fds[2] = { -1, -1 };
 
-       g_unix_open_pipe (wakeup_fds, FD_CLOEXEC, NULL);
+       if (!g_unix_open_pipe (wakeup_fds, FD_CLOEXEC, NULL))
+               exit (1);
 
        pid = fork ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]