Files
NapCatQQ/.pnpm-store/v3/files/cd/57b5118ca453355f18387dbb75cf1c2bd40d29601f41e747671d5c469c6e37c1157ddfd4a26853d5bcde15dbad658e76f9e8dd3d074e9b0e0c7f4c42f163f2
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

20 lines
696 B
Plaintext

/**
* 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);