2007-09-25 Dan Williams <dcbw@redhat.com>
* src/NetworkManager.c - (nm_signal_handler, main): don't ignore SIGTERM/SIGINT during startup git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2878 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2007-09-25 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/NetworkManager.c
|
||||
- (nm_signal_handler, main): don't ignore SIGTERM/SIGINT during startup
|
||||
|
||||
2007-09-25 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/supplicant-manager/nm-supplicant-manager.c
|
||||
|
@@ -102,6 +102,8 @@ nm_monitor_setup (void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean quit_early = FALSE;
|
||||
|
||||
static void
|
||||
nm_signal_handler (int signo)
|
||||
{
|
||||
@@ -139,6 +141,7 @@ nm_signal_handler (int signo)
|
||||
--in_fatal;
|
||||
|
||||
nm_warning ("Caught signal %d, shutting down normally.", signo);
|
||||
quit_early = TRUE;
|
||||
g_main_loop_quit (main_loop);
|
||||
break;
|
||||
|
||||
@@ -367,6 +370,10 @@ main (int argc, char *argv[])
|
||||
/* Bring up the loopback interface. */
|
||||
nm_system_enable_loopback ();
|
||||
|
||||
/* Told to quit before getting to the mainloop by the signal handler */
|
||||
if (quit_early == TRUE)
|
||||
goto done;
|
||||
|
||||
/* Run the main loop */
|
||||
exit_status = 0;
|
||||
g_main_loop_run (main_loop);
|
||||
|
Reference in New Issue
Block a user