uutils/coreutils · error · std::io::Error

Unsupported

Unsupported

Error message

unsupported signal on Windows

What it means

Error "unsupported signal on Windows" thrown in uutils/coreutils.

Source

Thrown at src/uu/kill/src/platform/windows.rs:22

// file that was distributed with this source code.

// spell-checker:ignore pids

//! Windows implementation of `kill`'s platform facade, built on the signal
//! emulation in [`uucore::process`]. PID 0 targets the Job object `kill` runs
//! in, the closest Windows analog of a process group. STOP (no process-suspend
//! API) and negative pids (no way to name another process's group) are
//! rejected.

use std::io;

use uucore::process::{enable_debug_privilege, send_signal_to_own_group, send_signal_to_pid};
use uucore::translate;

const SIGNAL_STOP: usize = 19;

fn unsupported(message: String) -> io::Error {
    io::Error::new(io::ErrorKind::Unsupported, message)
}

pub(crate) fn send_signal(pid: i32, sig: usize) -> io::Result<()> {
    if sig == SIGNAL_STOP {
        return Err(unsupported(translate!("kill-error-unsupported-signal")));
    }
    match u32::try_from(pid) {
        // Fails exactly for pid < 0.
        Err(_) => Err(unsupported(translate!(
            "kill-error-negative-pid-unsupported"
        ))),
        Ok(pid) => {
            // Group members need the same rights as a single target.
            enable_debug_privilege();
            if pid == 0 {
                send_signal_to_own_group(sig)
            } else {
                send_signal_to_pid(pid, sig)

View on GitHub (pinned to 0b77ced485)

Solutions

  1. Use only signals supported on Windows (e.g. SIGTERM/SIGINT equivalents) or run the command on a Unix platform.
  2. Map the requested signal to a supported Windows console control event.

When it happens

Trigger: Occurs when kill is asked to send a signal that has no Windows equivalent, since Windows only supports a small subset of POSIX signals.

Common situations: Using signals like SIGHUP, SIGUSR1, or SIGSTOP with the Windows build of kill; only a few signals (e.g. SIGTERM/SIGKILL equivalents) map.


AI-assisted analysis of uutils/coreutils@0b77ced485 (2026-08-19). Data as JSON: /api/errors/27e60f083569bca9. Report an issue: GitHub.