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("/");
          |         ^~~~~~~~~~
This commit is contained in:
Daniel Eklöf 2024-01-05 08:12:32 +01:00
parent 66f25bb434
commit 0ca4633898
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);