diff options
-rw-r--r-- | src/libmbim-glib/mbim-device.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c index 300d3ec..750b606 100644 --- a/src/libmbim-glib/mbim-device.c +++ b/src/libmbim-glib/mbim-device.c @@ -940,6 +940,13 @@ wait_for_proxy_cb (CreateIoChannelContext *ctx) } static void +spawn_child_setup (void) +{ + if (setpgid (0, 0) < 0) + g_warning ("couldn't setup proxy specific process group"); +} + +static void create_iochannel_with_socket (CreateIoChannelContext *ctx) { GSocketAddress *socket_address; @@ -996,7 +1003,7 @@ create_iochannel_with_socket (CreateIoChannelContext *ctx) argc, NULL, /* envp */ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, - NULL, /* child_setup */ + (GSpawnChildSetupFunc) spawn_child_setup, NULL, /* child_setup_user_data */ NULL, &error)) { |