watch method Null safety
Watch for process signals.
The following ProcessSignals can be listened to:
- ProcessSignal.sighup.
- ProcessSignal.sigint. Signal sent by e.g. CTRL-C.
- ProcessSignal.sigterm. Not available on Windows.
- ProcessSignal.sigusr1. Not available on Windows.
- ProcessSignal.sigusr2. Not available on Windows.
- ProcessSignal.sigwinch. Not available on Windows.
Other signals are disallowed, as they may be used by the VM.
A signal can be watched multiple times, from multiple isolates, where all callbacks are invoked when signaled, in no specific order.
Implementation
Stream<ProcessSignal> watch() => _ProcessUtils._watchSignal(this);