[glib/wip/wait-status: 11/13] subprocess test: Check wait status correctly




commit f2be22ca527691d2c30b34a1d6db1f86008bd461
Author: Simon McVittie <smcv collabora com>
Date:   Mon Jun 14 12:50:39 2021 +0100

    subprocess test: Check wait status correctly
    
    Confusingly, g_spawn_check_exit_status() takes a wait status, not an
    exit status, so passing g_subprocess_get_exit_status() to it is
    incorrect (although both encodings happen to use 0 to encode success
    and a nonzero value to encode failure, so in practice this probably
    had the desired effect).
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 gio/tests/gsubprocess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c
index 7ee42f389..096b9e952 100644
--- a/gio/tests/gsubprocess.c
+++ b/gio/tests/gsubprocess.c
@@ -611,7 +611,7 @@ on_subprocess_exited (GObject         *object,
           g_propagate_error (&data->error, error);
         }
     }
-  g_spawn_check_exit_status (g_subprocess_get_exit_status (subprocess), &error);
+  g_spawn_check_exit_status (g_subprocess_get_status (subprocess), &error);
   g_assert_no_error (error);
   data->events_pending--;
   if (data->events_pending == 0)


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