UNPKG

775 BJavaScriptView Raw
1"use strict";
2/**
3 * Copyright (c) 2019, Microsoft Corporation (MIT License).
4 *
5 * This module fetches the console process list for a particular PID. It must be
6 * called from a different process (child_process.fork) as there can only be a
7 * single console attached to a process.
8 */
9var getConsoleProcessList;
10try {
11 getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList;
12}
13catch (err) {
14 getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList;
15}
16var shellPid = parseInt(process.argv[2], 10);
17var consoleProcessList = getConsoleProcessList(shellPid);
18process.send({ consoleProcessList: consoleProcessList });
19process.exit(0);
20//# sourceMappingURL=conpty_console_list_agent.js.map
\No newline at end of file