We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa47985 commit fa123afCopy full SHA for fa123af
src/ipc/process.cpp
@@ -55,9 +55,11 @@ class ProcessImpl : public Process
55
// in combination with other arguments because the parent process
56
// should be able to control the child process through the IPC protocol
57
// without passing information out of band.
58
- if (!ParseInt32(argv[2], &fd)) {
+ const auto maybe_fd{ToIntegral<int32_t>(argv[2])};
59
+ if (!maybe_fd) {
60
throw std::runtime_error(strprintf("Invalid -ipcfd number '%s'", argv[2]));
61
}
62
+ fd = *maybe_fd;
63
return true;
64
65
int connect(const fs::path& data_dir,
0 commit comments