1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-09-20 01:08:33 +03:00

Use strerror to display execve failures

Fixes #4501
This commit is contained in:
Maxime Coste 2022-01-24 21:59:16 +11:00
parent 6f135c0c8e
commit f8a86149e5

View File

@ -134,7 +134,7 @@ pid_t spawn_shell(const char* shell, StringView cmdline,
execve(shell, (char* const*)execparams.data(), (char* const*)envptrs.data());
char buffer[1024];
write(STDERR_FILENO, format_to(buffer, "execve failed: {}\n", errno));
write(STDERR_FILENO, format_to(buffer, "execve failed: {}\n", strerror(errno)));
_exit(-1);
return -1;
}