zellij-org/zellij · error · std::io::Error
Process returned non-zero exit code
Error message
Process returned non-zero exit code: {} What it means
Error "Process returned non-zero exit code: {}" thrown in zellij-org/zellij.
Solutions
- Run the reported command manually to see its stderr and fix the underlying problem.
- Check the command's documentation for the meaning of its exit code.
When it happens
Trigger: Occurs at zellij-client/src/lib.rs:474 when the operation fails: "Process returned non-zero exit code: {}". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.
Common situations: Setup/check commands or external tools failing in the user environment.
AI-assisted analysis of zellij-org/zellij@e839bfffa5 (2026-08-19).
Data as JSON: /api/errors/54b9ba474cacd034.
Report an issue: GitHub.
Appendix: source
Thrown at zellij-client/src/lib.rs:479
/// On Unix the server daemonizes (double-fork) inside start_server(), so
/// the intermediate child exits immediately and `cmd.status()` returns.
#[cfg(not(windows))]
pub fn spawn_server(socket_path: &Path, debug: bool) -> io::Result<()> {
let mut cmd = Command::new(current_exe()?);
cmd.arg("--server").arg(socket_path);
if debug {
cmd.arg("--debug");
}
let status = cmd.status()?;
if status.success() {
Ok(())
} else {
let msg = "Process returned non-zero exit code";
let err_msg = match status.code() {
Some(c) => format!("{}: {}", msg, c),
None => msg.to_string(),
};
Err(io::Error::new(io::ErrorKind::Other, err_msg))
}
}
/// Spawn the Zellij server process.
///
/// On Windows there is no daemonize — we launch the server as a background
/// process with a hidden console. We use CREATE_NO_WINDOW (not
/// DETACHED_PROCESS) so the server gets valid standard handles;
/// DETACHED_PROCESS leaves stdin/stdout/stderr as NULL, which breaks PTY
/// creation, WASM plugin loading, and logging.
#[cfg(windows)]
pub fn spawn_server(socket_path: &Path, debug: bool) -> io::Result<()> {
use std::os::windows::process::CommandExt;
let mut cmd = Command::new(current_exe()?);
cmd.arg("--server").arg(socket_path);
if debug {
cmd.arg("--debug");
}View on GitHub (pinned to e839bfffa5)