aboutsummaryrefslogtreecommitdiff
path: root/slave.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-01-05 07:12:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-01-05 07:12:32 +0000
commit0ca46338986becfbbc24160083a9620e8f29a7ca (patch)
tree02f9b87a38b00ded1b4539d892c20009378744a6 /slave.c
parentslave: chdir to / after spawning the client application (diff)
slave: ignore return value of chdir()
It's not critical. Fixes ../slave.c: In function ‘slave_spawn’: ../slave.c:410:9: error: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 410 | chdir("/"); | ^~~~~~~~~~
Diffstat (limited to 'slave.c')
-rw-r--r--slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slave.c b/slave.c
index 1184d0c2..0cf64fa0 100644
--- a/slave.c
+++ b/slave.c
@@ -407,7 +407,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
* example, it may be a mount point of, say, a thumb drive. Us
* keeping it open will prevent the user from unmounting it.
*/
- chdir("/");
+ (void)!!chdir("/");
close(fork_pipe[1]); /* Close write end */
LOG_DBG("slave has PID %d", pid);