mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 06:31:15 +00:00
feat(std/node): Add support for process.on("exit") (#8940)
This commit adds support for process.on("exit") by appending a listener to the unload event. Luckily, unload works pretty much the same as on("exit") since it won't schedule any additional work in the even loop either. This commit also solves an error in the Node implementation, since "process.argv" didn't contained the main module route as it was supposed to.
This commit is contained in:
parent
e0eb111e3e
commit
1f8b83ba1a
5 changed files with 276 additions and 106 deletions
|
@ -1,6 +1,6 @@
|
|||
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||||
/// <reference path="./global.d.ts" />
|
||||
import { process as processModule } from "./process.ts";
|
||||
import processModule from "./process.ts";
|
||||
import { Buffer as bufferModule } from "./buffer.ts";
|
||||
import timers from "./timers.ts";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue