Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mp/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ int SpawnProcess(int& pid, FdToArgsFn&& fd_to_args)
{
int fds[2];
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) != 0) {
throw std::system_error(errno, std::system_category());
throw std::system_error(errno, std::system_category(), "socketpair");
}

pid = fork();
if (pid == -1) {
throw std::system_error(errno, std::system_category(), "fork");
}
if (close(fds[pid ? 0 : 1]) != 0) {
throw std::system_error(errno, std::system_category());
throw std::system_error(errno, std::system_category(), "close");
}
if (!pid) {
int maxFd = MaxFd();
Expand Down Expand Up @@ -138,7 +138,7 @@ int WaitProcess(int pid)
{
int status;
if (::waitpid(pid, &status, 0 /* options */) != pid) {
throw std::system_error(errno, std::system_category());
throw std::system_error(errno, std::system_category(), "waitpid");
}
return status;
}
Expand Down