nikivdev/code · error
jd already holds {}
Error message
jd already holds {} What it means
Error "jd already holds {}" thrown in nikivdev/code.
Source
Thrown at src/jd.rs:128
fn lock_path() -> Result<PathBuf> {
Ok(config::ensure_global_state_dir()?.join("jd.lock"))
}
fn legacy_socket_path() -> Result<PathBuf> {
Ok(config::ensure_global_state_dir()?.join("codexd.sock"))
}
#[cfg(unix)]
fn acquire_process_lock(file: &std::fs::File) -> Result<FileLockGuard> {
let fd = file.as_raw_fd();
let status = unsafe { libc::flock(fd, libc::LOCK_EX | libc::LOCK_NB) };
if status == 0 {
return Ok(FileLockGuard { fd });
}
let err = std::io::Error::last_os_error();
let raw = err.raw_os_error();
if raw == Some(libc::EWOULDBLOCK) || raw == Some(libc::EAGAIN) {
bail!("jd already holds {}", lock_path()?.display());
}
Err(err).context("failed to lock jd process lock")
}
#[cfg(not(unix))]
fn acquire_process_lock(_file: &std::fs::File) -> Result<()> {
Ok(())
}
pub fn ping() -> Result<()> {
let response = send_request(&CodexdRequest::Ping)?;
if response.ok {
Ok(())
} else {
bail!(
"{}",
response
.messageView on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/jd.rs:128 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/94e7138c6dd97b52.
Report an issue: GitHub.