mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 05:00:36 +01:00
core: wait until we daemonized before setting up signals (bgo #683932)
If we mask signals before daemonizing, the daemon process will not be able to handle them, and thus would be unkillable with anything other than SIGKILL.
This commit is contained in:
parent
866218b415
commit
64342a313e
1 changed files with 4 additions and 4 deletions
|
|
@ -401,10 +401,6 @@ main (int argc, char *argv[])
|
|||
exit (1);
|
||||
}
|
||||
|
||||
/* Set up unix signal handling */
|
||||
if (!setup_signals ())
|
||||
exit (1);
|
||||
|
||||
/* Set locale to be able to use environment variables */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
|
|
@ -501,6 +497,10 @@ main (int argc, char *argv[])
|
|||
wrote_pidfile = TRUE;
|
||||
}
|
||||
|
||||
/* Set up unix signal handling - before creating threads, but after daemonizing! */
|
||||
if (!setup_signals ())
|
||||
exit (1);
|
||||
|
||||
if (g_fatal_warnings) {
|
||||
GLogLevelFlags fatal_mask;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue