summaryrefslogtreecommitdiff
path: root/js/os.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/os.ts')
-rw-r--r--js/os.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/os.ts b/js/os.ts
index e56aab574..cbcd9c665 100644
--- a/js/os.ts
+++ b/js/os.ts
@@ -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;