core: use GUnixSignalWatchSource to simplify signal handling

Replace the pthread_sigwait()-based signal handling with
g_unix_signal_add()-based handling, and get rid of all the
now-unnecessary calls to nm_unblock_posix_signals() when spawning
subprocesses.

As a bonus, this also fixes the "^C in gdb kills NM too" bug.
This commit is contained in:
Dan Winship
2015-01-12 11:31:10 -05:00
parent 1c435dc874
commit c5b3e93792
20 changed files with 43 additions and 271 deletions

View File

@@ -35,7 +35,6 @@
#include "nm-device.h"
#include "nm-active-connection.h"
#include "nm-settings-connection.h"
#include "nm-posix-signals.h"
#include "nm-auth-subject.h"
G_DEFINE_TYPE (NMActRequest, nm_act_request, NM_TYPE_ACTIVE_CONNECTION)
@@ -202,8 +201,6 @@ share_child_setup (gpointer user_data G_GNUC_UNUSED)
/* We are in the child process at this point */
pid_t pid = getpid ();
setpgid (pid, pid);
nm_unblock_posix_signals (NULL);
}
void