mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 00:13:40 +02:00
GWin32AppInfo: Actually report the GPid in the GAppLaunchContext::launched signal
We need to pass the G_SPAWN_DO_NOT_REAP_CHILD flag to g_spawn_async, otherwise the returned child_pid will always be 0.
This commit is contained in:
@@ -1439,6 +1439,11 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
* example if the process was launched via D-Bus). The `pid` may not be
|
||||
* set at all in subsequent releases.
|
||||
*
|
||||
* On Windows, `pid` is guaranteed to be valid only for the duration of the
|
||||
* #GAppLaunchContext::launched signal emission; after the signal is emitted,
|
||||
* GLib will call g_spawn_close_pid(). If you need to keep the #GPid after the
|
||||
* signal has been emitted, then you can duplicate `pid` using `DuplicateHandle()`.
|
||||
*
|
||||
* Since: 2.36
|
||||
*/
|
||||
signals[LAUNCHED] = g_signal_new (I_("launched"),
|
||||
|
Reference in New Issue
Block a user