Merge branch 'fix-chdir' into 'master'

fix: Use cwd_guard directly to prevent deadlock in chdir

See merge request redox-os/relibc!1056
This commit is contained in:
Jeremy Soller
2026-03-01 07:04:01 -07:00
+1 -1
View File
@@ -93,7 +93,7 @@ pub fn chdir(path: &str) -> Result<()> {
let mut cwd_guard = CWD.write();
let (is_relative, path) = normalize_path(path).ok_or(Error::new(ENOENT))?;
if is_relative {
let fd = current_dir()?
let fd = cwd_guard
.as_ref()
.unwrap()
.fd