check_exit_status


Description:

[ Version ( deprecated_since = "2.70" , replacement = "check_wait_status" , since = "2.34" ) ]
[ CCode ( cname = "g_spawn_check_exit_status" ) ]
public bool check_exit_status (int wait_status) throws Error

Warning: check_exit_status is deprecated since 2.70. Use check_wait_status.

An old name for check_wait_status, deprecated because its name is misleading.

Note:

Use check_wait_status instead, and check whether your code is conflating wait and exit statuses.

Despite the name of the function, wait_status must be the wait status as returned by spawn_sync, g_subprocess_get_status, `waitpid()`, etc. On Unix platforms, it is incorrect for it to be the exit status as passed to `exit()` or returned by g_subprocess_get_exit_status or `WEXITSTATUS()`.

Parameters:

wait_status

A status as returned from spawn_sync

Returns:

true if child exited successfully, false otherwise (and throws will be set)


Namespace: GLib.Process
Package: glib-2.0