MCPcopy Index your code
hub / github.com/nodejs/node / convertToValidSignal

Function convertToValidSignal

lib/internal/util.js:369–379  ·  view source on GitHub ↗
(signal)

Source from the content-addressed store, hash-verified

367}
368
369function convertToValidSignal(signal) {
370 if (typeof signal === 'number' && getSignalsToNamesMapping()[signal])
371 return signal;
372
373 if (typeof signal === 'string') {
374 const signalName = signals[StringPrototypeToUpperCase(signal)];
375 if (signalName) return signalName;
376 }
377
378 throw new ERR_UNKNOWN_SIGNAL(signal);
379}
380
381function convertProcessSignalToExitCode(signalCode) {
382 // Lazy-load to avoid a circular dependency.

Callers 3

sanitizeKillSignalFunction · 0.85
child_process.jsFile · 0.85
watch_mode.jsFile · 0.85

Calls 1

getSignalsToNamesMappingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…