Gio.Subprocess.get_exit_status

### Method

# Gio Subprocessget_exit_status

since: 2.40

#### Declaration

    gint
    g_subprocess_get_exit_status (
      GSubprocess* subprocess
    )

#### Description

Check the exit status of the subprocess, given that it exited normally. This is the value passed to the `exit()` system call or the return value from main.

This is equivalent to the system WEXITSTATUS macro.

It is an error to call this function before `g_subprocess_wait()` and unless `g_subprocess_get_if_exited()` returned `TRUE`.

Available since: 2.40

#### Return value

Type: `gint`

The exit status.