-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Labels
P-cliProposal: wasi-cliProposal: wasi-cli
Description
Currently, WASI does not describe any way for a CLI guest to receive the Ctrl+C signal (SIGINT on Unix). This signal is commonly used to request graceful shutdown, giving the application some time to e.g.:
- clean up resources,
- flush buffers to disk,
- stop listening for new network requests, while letting the existing ones run to completion,
- etc..
The component model has built-in support for async cancellation, and I think that in the CLI world Ctrl+C maps neatly to cancellation of the main (run) function.
I propose we update the documentation of the run function to say something along the lines of:
If a host wishes to propagate Ctrl+C into the guest, then cancellation of the
runtask is the canonical way to do so.
WDYT?
Related: #166
Metadata
Metadata
Assignees
Labels
P-cliProposal: wasi-cliProposal: wasi-cli