diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-01-06 14:16:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-06 14:16:42 -0500 |
commit | 57301909cd9eee6aeaafeda19aab372e034ff7c4 (patch) | |
tree | 60e7d9929fe5bd6f46dca5b38b1e70a790170e70 /js/os.ts | |
parent | 028d8e4d90d2224334b44ccb1836dc47d85a9526 (diff) |
Add deno.pid (#1464)
Diffstat (limited to 'js/os.ts')
-rw-r--r-- | js/os.ts | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5,6 +5,14 @@ import * as util from "./util"; import * as flatbuffers from "./flatbuffers"; import { sendSync } from "./dispatch"; +/** process id */ +export let pid: number; + +export function setPid(pid_: number): void { + assert(!pid); + pid = pid_; +} + interface CodeInfo { moduleName: string | undefined; filename: string | undefined; |