[at-spi2-core: 7/32] Call g_spawn_close_pid() when we don't need it anymore




commit 8f812c3b382871575ae3983d6b12389ccecf7d89
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Dec 8 20:28:48 2021 -0600

    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.

 bus/at-spi-bus-launcher.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]