diff options
author | Federico Mena Quintero <federico@gnome.org> | 2021-12-08 20:28:48 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2021-12-13 16:36:39 -0600 |
commit | 8f812c3b382871575ae3983d6b12389ccecf7d89 (patch) | |
tree | 0ce7609537987ade651504d954b2699a014593e0 /bus | |
parent | 5ce9eef73740709325f553e3719f933106a799fe (diff) | |
download | at-spi2-core-8f812c3b382871575ae3983d6b12389ccecf7d89.tar.gz |
Call g_spawn_close_pid() when we don't need it anymore
This does nothing on Unix, but the GIO documentation recommends it as
necessary on Windows.
Diffstat (limited to 'bus')
-rw-r--r-- | bus/at-spi-bus-launcher.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 360d78a7..123a4653 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -356,6 +356,7 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) { app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", strerror (errno)); kill (app->a11y_bus_pid, SIGTERM); + g_spawn_close_pid (app->a11y_bus_pid); app->a11y_bus_pid = -1; goto error; } @@ -962,7 +963,11 @@ main (int argc, g_main_loop_run (_global_app->loop); if (_global_app->a11y_bus_pid > 0) - kill (_global_app->a11y_bus_pid, SIGTERM); + { + kill (_global_app->a11y_bus_pid, SIGTERM); + g_spawn_close_pid (_global_app->a11y_bus_pid); + _global_app->a11y_bus_pid = -1; + } /* Clear the X property if our bus is gone; in the case where e.g. * GDM is launching a login on an X server it was using before, |