[PATCH 4/4] core: perform clean-up when terminating due to a Unix signal

Jakub Sitnicki jsitnicki at gmail.com
Sun Jan 11 06:07:23 PST 2015


Since commit 2d700043abc5 ("core: use g_unix_signal_add() for more
reliable Unix signal handling") we no longer have to stick to
signal-safe functions in the SIGTERM/SIGINT handler.

Use exit() to terminate so that the clean-up functions are ran and code
coverage data gets written into files.
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index a5ff664..47fa613 100644
--- a/src/main.c
+++ b/src/main.c
@@ -47,7 +47,7 @@ quit_cb (gpointer user_data)
     if (loop)
         g_idle_add ((GSourceFunc) g_main_loop_quit, loop);
     else
-        _exit (0);
+        exit (0);
     return FALSE;
 }
 
-- 
1.9.3



More information about the ModemManager-devel mailing list