mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 16:20:14 +01:00
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:
parent
9adf247717
commit
cb286aac71
2 changed files with 12 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue