mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
Patch from Helmut Schaa <hschaa suse de>
* Let nm-ppp-starter die gracefully even if
pppd exits badly
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2214 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
e06d070412
commit
7c66269c9d
1 changed files with 14 additions and 1 deletions
|
|
@ -771,6 +771,19 @@ static gint nm_ppp_get_cmdline_ppp (NmPPPData *data, char **data_items, const in
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* nm_pptp_child_setup
|
||||
*
|
||||
* Set the process group ID of the newly forked process
|
||||
*
|
||||
*/
|
||||
void nm_pptp_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_ppp_start_vpn_binary
|
||||
*
|
||||
|
|
@ -836,7 +849,7 @@ static gint nm_ppp_start_ppp_binary (NmPPPData *data, char **data_items, const i
|
|||
}
|
||||
|
||||
if (!g_spawn_async_with_pipes (NULL, (char **) ppp_argv->pdata, NULL,
|
||||
G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &stdin_fd,
|
||||
G_SPAWN_DO_NOT_REAP_CHILD, &nm_pptp_child_setup, NULL, &pid, &stdin_fd,
|
||||
NULL, NULL, &error))
|
||||
{
|
||||
g_ptr_array_foreach(free_later,(GFunc)g_free,NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue