Kaynağa Gözat

Also fail if cwd could not be written to escalated.

4lDO2 2 yıl önce
ebeveyn
işleme
c26ce37620
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/platform/redox/exec.rs

+ 1 - 1
src/platform/redox/exec.rs

@@ -225,7 +225,7 @@ pub fn execve(path: &CStr, arg_env: ArgEnv, interp_override: Option<redox_exec::
         // individual items. This can be copied directly into the new executable's memory.
         let _ = syscall::write(*escalate_fd, &flatten_with_nul(args))?;
         let _ = syscall::write(*escalate_fd, &flatten_with_nul(envs))?;
-        let _ = syscall::write(*escalate_fd, &cwd);
+        let _ = syscall::write(*escalate_fd, &cwd)?;
 
         // Closing will notify the scheme, and from that point we will no longer have control
         // over this process (unless it fails). We do this manually since drop cannot handle