PreturnOnExit
Bun

property

wasi.WASIOptions.returnOnExit

returnOnExit?: boolean

By default, when WASI applications call __wasi_proc_exit() wasi.start() will return with the exit code specified rather than terminatng the process. Setting this option to false will cause the Node.js process to exit with the specified exit code instead.