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.Subprocess.getIfExited and gio.subprocess.Subprocess.getExitStatus.

This function does not fail in the case of the subprocess having abnormal termination. See gio.subprocess.Subprocess.waitCheck for that.

Cancelling cancellable doesn't kill the subprocess. Call gio.subprocess.Subprocess.forceExit if it is desirable.

class Subprocess
bool
wait

Parameters

cancellable gio.cancellable.Cancellable

a #GCancellable

Return Value

Type: bool

true on success, false if cancellable was cancelled