MCPcopy Index your code
hub / github.com/codeaashu/claude-code / killCaffeinate

Function killCaffeinate

src/services/preventSleep.ts:153–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151}
152
153function killCaffeinate(): void {
154 if (caffeinateProcess !== null) {
155 const proc = caffeinateProcess
156 caffeinateProcess = null
157 try {
158 // SIGKILL for immediate termination - SIGTERM could be delayed
159 proc.kill('SIGKILL')
160 logForDebugging('Stopped caffeinate, allowing sleep')
161 } catch {
162 // Process may have already exited
163 }
164 }
165}
166

Callers 3

stopPreventSleepFunction · 0.85
forceStopPreventSleepFunction · 0.85
startRestartIntervalFunction · 0.85

Calls 2

logForDebuggingFunction · 0.85
killMethod · 0.45

Tested by

no test coverage detected