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.
This commit is contained in:
parent
6cf40bd0c4
commit
9b01620e8d
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue