diff options
author | cjihrig <cjihrig@gmail.com> | 2020-03-05 04:46:02 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2020-03-08 18:05:23 +0300 |
commit | 6aff62fcb326bd3d51dbbcf91e63f6d2150488b3 (patch) | |
tree | d97fe148f1affbe11669aa01d6db2652c14d39fd /doc/api/wasi.md | |
parent | 4d93e105bfad79ff6c6f01e4b7c2fdd70caeb43b (diff) |
wasi: add returnOnExit option
This commit adds a WASI option allowing the __wasi_proc_exit()
function to return an exit code instead of forcefully terminating
the process.
PR-URL: https://github.com/nodejs/node/pull/32101
Fixes: https://github.com/nodejs/node/issues/32093
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'doc/api/wasi.md')
-rw-r--r-- | doc/api/wasi.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/wasi.md b/doc/api/wasi.md index 3a72442d77f..27dceaa014f 100644 --- a/doc/api/wasi.md +++ b/doc/api/wasi.md @@ -58,6 +58,10 @@ added: v13.3.0 sandbox directory structure. The string keys of `preopens` are treated as directories within the sandbox. The corresponding values in `preopens` are the real paths to those directories on the host machine. + * `returnOnExit` {boolean} By default, WASI applications terminate the Node.js + process via the `__wasi_proc_exit()` function. Setting this option to `true` + causes `wasi.start()` to return the exit code rather than terminate the + process. **Default:** `false`. ### `wasi.start(instance)` <!-- YAML |