Gio.Subprocess.prototype.wait

function wait(cancellable: Gio.Cancellable): Boolean {
    // Gjs wrapper for g_subprocess_wait()
}
  

Synchronously wait for the subprocess to terminate.

After the process terminates you can query its exit status with functions such as Gio.Subprocess.prototype.get_if_exited and Gio.Subprocess.prototype.get_exit_status.

This function does not fail in the case of the subprocess having abnormal termination. See Gio.Subprocess.prototype.wait_check for that.

Since 2.40

cancellable

a Gio.Cancellable

Returns

true on success, false if cancellable was cancelled