SystemServer: Improve error message when execv() fails

Previously perror() would just tell us that the file specified
for execv() doesn't exist.
This commit is contained in:
Gunnar Beutner 2021-06-15 15:14:09 +02:00 committed by Andreas Kling
parent d7a03397af
commit 0ca5a393d1
Notes: sideshowbarker 2024-07-18 12:08:31 +09:00

View File

@ -234,7 +234,8 @@ void Service::spawn(int socket_fd)
argv[m_extra_arguments.size() + 1] = nullptr;
rc = execv(argv[0], argv);
perror("exec");
warnln("Failed to execv({}, ...): {}", argv[0], strerror(errno));
dbgln("Failed to execv({}, ...): {}", argv[0], strerror(errno));
VERIFY_NOT_REACHED();
} else if (!m_multi_instance) {
// We are the parent.