Gio.Subprocess.prototype.get_status

function get_status(): Number(gint) {
    // Gjs wrapper for g_subprocess_get_status()
}
  

Gets the raw status code of the process, as from waitpid().

This value has no particular meaning, but it can be used with the macros defined by the system headers such as WIFEXITED. It can also be used with GLib.spawn_check_exit_status.

It is more likely that you want to use Gio.Subprocess.prototype.get_if_exited followed by Gio.Subprocess.prototype.get_exit_status.

It is an error to call this function before Gio.Subprocess.prototype.wait has returned.

Since 2.40

Returns

the (meaningless) waitpid() exit status from the kernel