diff options
Diffstat (limited to 'js/process.ts')
-rw-r--r-- | js/process.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/process.ts b/js/process.ts index 4de9fe774..0c77929f9 100644 --- a/js/process.ts +++ b/js/process.ts @@ -5,7 +5,7 @@ import { File, close } from "./files.ts"; import { ReadCloser, WriteCloser } from "./io.ts"; import { readAll } from "./buffer.ts"; import { assert, unreachable } from "./util.ts"; -import { platform } from "./build.ts"; +import { build } from "./build.ts"; /** How to handle subprocess stdio. * @@ -296,4 +296,12 @@ enum MacOSSignal { /** Signals numbers. This is platform dependent. */ -export const Signal = platform.os === "mac" ? MacOSSignal : LinuxSignal; +export const Signal = {}; + +export function setSignals(): void { + if (build.os === "mac") { + Object.assign(Signal, MacOSSignal); + } else { + Object.assign(Signal, LinuxSignal); + } +} |