installed pty
[VSoRC/.git] / node_modules / node-pty / lib / conpty_console_list_agent.js
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  */
9 var getConsoleProcessList;
10 try {
11     getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList;
12 }
13 catch (err) {
14     getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList;
15 }
16 var shellPid = parseInt(process.argv[2], 10);
17 var consoleProcessList = getConsoleProcessList(shellPid);
18 process.send({ consoleProcessList: consoleProcessList });
19 process.exit(0);
20 //# sourceMappingURL=conpty_console_list_agent.js.map