Commit aa497fa6 authored by Steve Langasek's avatar Steve Langasek
Browse files

Install the SIGUSR1 signal handler before daemonizing mountall, so that

there's no race with signals from network interfaces being brought up.
LP: #960079.
parent f7223d8a
......@@ -13,6 +13,11 @@ mountall (2.37) UNRELEASED; urgency=low
* Honor nobootwait option for /var/* and /usr/* remote filesystems.
LP: #654545
[ Eelco Dolstra ]
* Install the SIGUSR1 signal handler before daemonizing mountall, so that
there's no race with signals from network interfaces being brought up.
LP: #960079.
-- Steve Langasek <vorlon@debian.org> Fri, 18 May 2012 22:38:55 -0700
mountall (2.36) precise; urgency=low
......
......@@ -3848,6 +3848,12 @@ main (int argc,
exit (EXIT_ERROR);
}
/* SIGUSR1 tells us that a network device came up. Install
the handler before daemonising so that the mountall-net job
won't kill us by sending USR1. */
nih_signal_set_handler (SIGUSR1, nih_signal_handler);
NIH_MUST (nih_signal_add_handler (NULL, SIGUSR1, usr1_handler, NULL));
/* Become daemon */
if (daemonise) {
pid_t pid;
......@@ -3901,10 +3907,6 @@ main (int argc,
nih_signal_set_handler (SIGTERM, nih_signal_handler);
NIH_MUST (nih_signal_add_handler (NULL, SIGTERM, nih_main_term_signal, NULL));
/* SIGUSR1 tells us that a network device came up */
nih_signal_set_handler (SIGUSR1, nih_signal_handler);
NIH_MUST (nih_signal_add_handler (NULL, SIGUSR1, usr1_handler, NULL));
/* Check for force-fsck on the kernel command line */
cmdline = fopen ("/proc/cmdline", "r");
if (cmdline) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment