slave: log _which_ CWD we failed to change to

This commit is contained in:
Daniel Eklöf 2021-08-30 17:55:16 +02:00
parent 3990cd4392
commit 064121ee95
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -269,7 +269,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv,
if (chdir(cwd) < 0) {
const int errno_copy = errno;
LOG_ERRNO("failed to change working directory");
LOG_ERRNO("failed to change working directory to %s", cwd);
(void)!write(fork_pipe[1], &errno_copy, sizeof(errno_copy));
_exit(errno_copy);
}