status method

Future<ProcessStatus> status()

Wait for the process to exit and return its exit status.

Calling this function multiple times will return the same status.

The stdin reference to the process will be closed before waiting to avoid a deadlock.

If stdout and/or stderr were set to "piped", they must be closed manually before the process can exit.

To run process to completion and collect output from both stdout and stderr use:

const p = Deno.run({ cmd: [ "echo", "hello world" ], stderr: 'piped', stdout: 'piped' });
const [status, stdout, stderr] = await Promise.all([
  p.status(),
  p.output(),
  p.stderrOutput()
]);
p.close();

Implementation

_i2.Future<_i4.ProcessStatus> status() => _i3.promiseToFuture(_i3.callMethod(
      this,
      'status',
      [],
    ));