Set all variables to defaults in header

This commit is contained in:
TheAssassin
2020-08-07 21:18:56 +02:00
parent d43e8a42bf
commit 88dd09f2d1
2 changed files with 4 additions and 5 deletions

View File

@@ -11,11 +11,11 @@ namespace linuxdeploy {
class process {
private:
// child process ID
int child_pid_;
int child_pid_ = -1;
// pipes to child process's stdout/stderr
int stdout_fd_;
int stderr_fd_;
int stdout_fd_ = -1;
int stderr_fd_ = -1;
// process exited
bool exited_ = false;

View File

@@ -32,8 +32,7 @@ int process::stderr_fd() const {
process::process(std::initializer_list<std::string> args, const subprocess_env_map_t& env)
: process(std::vector<std::string>(args), env) {}
process::process(const std::vector<std::string>& args, const subprocess_env_map_t& env)
: exited_(false), exit_code_(0) {
process::process(const std::vector<std::string>& args, const subprocess_env_map_t& env) {
// preconditions
util::assert::assert_not_empty(args);