MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / processAliveCommand

Function processAliveCommand

e2e/cli/service-install-takeover.test.ts:165–168  ·  view source on GitHub ↗
(pid: string)

Source from the content-addressed store, hash-verified

163 : `${exe} service install --port ${PORT}`;
164
165const processAliveCommand = (pid: string): string =>
166 guestOs() === "windows"
167 ? `if (Get-Process -Id ${pid} -ErrorAction SilentlyContinue) { 'alive' } else { 'dead' }`
168 : `kill -0 ${pid} 2>/dev/null && echo alive || echo dead`;
169
170const restoreServiceCommand = (exe: string): string =>
171 guestOs() === "windows"

Calls 1

guestOsFunction · 0.70

Tested by

no test coverage detected