{"record":{"id":"27e60f083569bca9","repo":"uutils/coreutils","slug":"unsupported","errorCode":"Unsupported","errorMessage":"unsupported signal on Windows","messagePattern":"unsupported signal on Windows","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"src/uu/kill/src/platform/windows.rs","lineNumber":22,"sourceCode":"// file that was distributed with this source code.\n\n// spell-checker:ignore pids\n\n//! Windows implementation of `kill`'s platform facade, built on the signal\n//! emulation in [`uucore::process`]. PID 0 targets the Job object `kill` runs\n//! in, the closest Windows analog of a process group. STOP (no process-suspend\n//! API) and negative pids (no way to name another process's group) are\n//! rejected.\n\nuse std::io;\n\nuse uucore::process::{enable_debug_privilege, send_signal_to_own_group, send_signal_to_pid};\nuse uucore::translate;\n\nconst SIGNAL_STOP: usize = 19;\n\nfn unsupported(message: String) -> io::Error {\n    io::Error::new(io::ErrorKind::Unsupported, message)\n}\n\npub(crate) fn send_signal(pid: i32, sig: usize) -> io::Result<()> {\n    if sig == SIGNAL_STOP {\n        return Err(unsupported(translate!(\"kill-error-unsupported-signal\")));\n    }\n    match u32::try_from(pid) {\n        // Fails exactly for pid < 0.\n        Err(_) => Err(unsupported(translate!(\n            \"kill-error-negative-pid-unsupported\"\n        ))),\n        Ok(pid) => {\n            // Group members need the same rights as a single target.\n            enable_debug_privilege();\n            if pid == 0 {\n                send_signal_to_own_group(sig)\n            } else {\n                send_signal_to_pid(pid, sig)","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/uutils/coreutils/blob/0b77ced48502a5f80c51dfa827af7e69f3687053/src/uu/kill/src/platform/windows.rs#L4-L40","documentation":"Error \"unsupported signal on Windows\" thrown in uutils/coreutils.","triggerScenarios":"Occurs when kill is asked to send a signal that has no Windows equivalent, since Windows only supports a small subset of POSIX signals.","commonSituations":"Using signals like SIGHUP, SIGUSR1, or SIGSTOP with the Windows build of kill; only a few signals (e.g. SIGTERM/SIGKILL equivalents) map.","solutions":["Use only signals supported on Windows (e.g. SIGTERM/SIGINT equivalents) or run the command on a Unix platform.","Map the requested signal to a supported Windows console control event."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0b77ced48502a5f80c51dfa827af7e69f3687053","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}