about summary refs log tree commit diff
path: root/src/rt/rust_run_program.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-07 20:28:57 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-07 20:28:57 -0800
commit9b01620e8d427275217f413c770c79d2d70fac6c (patch)
tree1b6ed8a223b19fb9dadf04a1e7ac2a37b057b109 /src/rt/rust_run_program.cpp
parent6cf40bd0c4ed735a4280b13a699d9d80fa918830 (diff)
downloadrust-9b01620e8d427275217f413c770c79d2d70fac6c.tar.gz
rust-9b01620e8d427275217f413c770c79d2d70fac6c.zip
rt: Don't ignore result of chdir. Fail hard for now with a FIXME
My gcc won't let the result of this function be ignored.
Diffstat (limited to 'src/rt/rust_run_program.cpp')
-rw-r--r--src/rt/rust_run_program.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_run_program.cpp b/src/rt/rust_run_program.cpp
index 848b015dd6c..a1a9e8d6189 100644
--- a/src/rt/rust_run_program.cpp
+++ b/src/rt/rust_run_program.cpp
@@ -153,7 +153,11 @@ rust_run_program(const char* argv[],
     if (err_fd) dup2(err_fd, 2);
     /* Close all other fds. */
     for (int fd = getdtablesize() - 1; fd >= 3; fd--) close(fd);
-    if (dir) { chdir(dir); }
+    if (dir) {
+        int result = chdir(dir);
+        // FIXME: need error handling
+        assert(!result && "chdir failed");
+    }
 
 #ifdef __APPLE__
     if (envp) {