You've already forked linuxdeploy
mirror of
https://github.com/encounter/linuxdeploy.git
synced 2026-07-10 12:18:44 -07:00
Compare commits
1 Commits
continuous
...
fix-145
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d57e9ae9b |
@@ -41,10 +41,19 @@ process::process(const std::vector<std::string>& args, const subprocess_env_map_
|
|||||||
int stdout_pipe_fds[2];
|
int stdout_pipe_fds[2];
|
||||||
int stderr_pipe_fds[2];
|
int stderr_pipe_fds[2];
|
||||||
|
|
||||||
|
// FIXME: for debugging of #150
|
||||||
|
auto create_pipe = [](int fds[]) {
|
||||||
|
const auto rv = pipe(fds);
|
||||||
|
|
||||||
|
if (rv != 0) {
|
||||||
|
const auto error = errno;
|
||||||
|
throw std::logic_error("failed to create pipe: " + std::string(strerror(error)));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// create actual pipes
|
// create actual pipes
|
||||||
if (pipe(stdout_pipe_fds) != 0 || pipe(stderr_pipe_fds) != 0) {
|
create_pipe(stdout_pipe_fds);
|
||||||
throw std::logic_error{"failed to create pipes"};
|
create_pipe(stderr_pipe_fds);
|
||||||
}
|
|
||||||
|
|
||||||
// create child process
|
// create child process
|
||||||
child_pid_ = fork();
|
child_pid_ = fork();
|
||||||
|
|||||||
Reference in New Issue
Block a user