mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-13 09:20:36 +01:00
core: assert that nm_utils_spawn_helper() is used with default context
This commit is contained in:
parent
3411f42418
commit
a52d620549
1 changed files with 6 additions and 0 deletions
|
|
@ -5138,6 +5138,12 @@ nm_utils_spawn_helper(const char *const *args,
|
|||
|
||||
context = g_task_get_context(info->task);
|
||||
|
||||
/* The async function makes a lukewarm attempt to honor the current thread default
|
||||
* context. However, it later uses nm_utils_kill_child_async() which always uses
|
||||
* g_main_context_default(). For now, the function really can only be used with the
|
||||
* main context. */
|
||||
nm_assert(context == g_main_context_default());
|
||||
|
||||
info->child_watch_source = g_child_watch_source_new(info->pid);
|
||||
g_source_set_callback(info->child_watch_source,
|
||||
G_SOURCE_FUNC(helper_child_terminated),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue