### Function

# GLib spawn_check_exit_status

deprecated: 2.70 since: 2.34

#### Declaration

    gboolean
    g_spawn_check_exit_status (
      gint wait_status,
      GError** error
    )

#### Description

An old name for g_spawn_check_wait_status(), deprecated because its name is misleading.

Despite the name of the function, `wait_status` must be the wait status as returned by g_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()`.

Available since: 2.34

Deprecated since: 2.70

Use `g_spawn_check_wait_status()` instead, and check whether your code is conflating wait and exit statuses.

#### Parameters

`wait_status`

  Type: `gint`

  A status as returned from g_spawn_sync().

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if child exited successfully, `FALSE` otherwise (and `error` will be set).