diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-15 15:14:09 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-17 11:03:51 +0200 |
commit | 0ca5a393d1fafe77570f551376177f5755c30f7a (patch) | |
tree | 3ecb02804d0d63f9bffafb12bc1f4b06c8bb65e9 | |
parent | d7a03397af78048c00e7cdfe9ff8ddadb632d076 (diff) | |
download | serenity-0ca5a393d1fafe77570f551376177f5755c30f7a.zip |
SystemServer: Improve error message when execv() fails
Previously perror() would just tell us that the file specified
for execv() doesn't exist.
-rw-r--r-- | Userland/Services/SystemServer/Service.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Services/SystemServer/Service.cpp b/Userland/Services/SystemServer/Service.cpp index b3cb8fd8ed..cc712ecf29 100644 --- a/Userland/Services/SystemServer/Service.cpp +++ b/Userland/Services/SystemServer/Service.cpp @@ -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. |