X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=blobdiff_plain;f=node_modules%2Fnode-pty%2Fsrc%2Fconpty_console_list_agent.ts;fp=node_modules%2Fnode-pty%2Fsrc%2Fconpty_console_list_agent.ts;h=2aec542534698fcc0586f64a6ae7b7fd2d37af9f;hp=0000000000000000000000000000000000000000;hb=e79e4a5a87f3e84f7c1777f10a954453a69bf540;hpb=4339da12467b75fb8b6ca831f4bf0081c485ed2c diff --git a/node_modules/node-pty/src/conpty_console_list_agent.ts b/node_modules/node-pty/src/conpty_console_list_agent.ts new file mode 100644 index 0000000..2aec542 --- /dev/null +++ b/node_modules/node-pty/src/conpty_console_list_agent.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) 2019, Microsoft Corporation (MIT License). + * + * This module fetches the console process list for a particular PID. It must be + * called from a different process (child_process.fork) as there can only be a + * single console attached to a process. + */ + +let getConsoleProcessList: any; +try { + getConsoleProcessList = require('../build/Release/conpty_console_list.node').getConsoleProcessList; +} catch (err) { + getConsoleProcessList = require('../build/Debug/conpty_console_list.node').getConsoleProcessList; +} + +const shellPid = parseInt(process.argv[2], 10); +const consoleProcessList = getConsoleProcessList(shellPid); +process.send({ consoleProcessList }); +process.exit(0);