core/discord
Interfaces
DiscordProcess
Defined in: venpm/src/core/discord.ts:5
Properties
exe
exe: string;Defined in: venpm/src/core/discord.ts:7
pid
pid: number;Defined in: venpm/src/core/discord.ts:6
KillResult
Defined in: venpm/src/core/discord.ts:10
Properties
forced
forced: number[];Defined in: venpm/src/core/discord.ts:13
found
found: DiscordProcess[];Defined in: venpm/src/core/discord.ts:11
killed
killed: number[];Defined in: venpm/src/core/discord.ts:12
Functions
findDiscordProcesses()
function findDiscordProcesses(
fs,
shell,
configuredBinary?): Promise<DiscordProcess[]>;Defined in: venpm/src/core/discord.ts:64
Find running Discord processes on Linux by inspecting /proc/<pid>/exe. Only returns processes whose binary resolves to a known Discord path.
On non-Linux platforms, falls back to ps output parsing (macOS) or returns an empty array (Windows — handled separately by the caller).
Parameters
| Parameter | Type |
|---|---|
fs | FileSystem |
shell | ShellRunner |
configuredBinary? | string | null |
Returns
Promise<DiscordProcess[]>
isDiscordBinary()
function isDiscordBinary(resolvedPath, configuredBinary?): boolean;Defined in: venpm/src/core/discord.ts:50
Check whether a resolved binary path belongs to a Discord installation. Matches against known install locations + the user's configured binary.
Parameters
| Parameter | Type |
|---|---|
resolvedPath | string |
configuredBinary? | string | null |
Returns
boolean
killDiscordProcesses()
function killDiscordProcesses(
fs,
shell,
configuredBinary?): Promise<KillResult>;Defined in: venpm/src/core/discord.ts:185
Kill all running Discord processes with SIGTERM → wait → SIGKILL escalation.
- Discovers processes via
/proc/<pid>/exe(Linux) orps(macOS) - Sends SIGTERM to all matching PIDs
- Waits up to 5 s for graceful exit (polling every 250 ms)
- Sends SIGKILL to any survivors
- Waits up to 2 s for forced exit
On Windows, falls back to taskkill /F against the configured binary name.
Parameters
| Parameter | Type |
|---|---|
fs | FileSystem |
shell | ShellRunner |
configuredBinary? | string | null |
Returns
Promise<KillResult>