예제 #1
0
 generator_manager(const char* cmds, int nb_pipes, const char* shell = 0)
   : generator_manager_base(nb_pipes, shell)
   , cmds_(cmds)
 {
   if(!cmds_.good())
     throw std::runtime_error(err::msg() << "Failed to open cmds file '" << cmds << "'");
 }
 generator_manager(const char* cmds, int nb_pipes, const char* shell = 0) :
   cmds_(cmds),
   pipes_(nb_pipes),
   manager_pid_(-1),
   shell_(shell),
   kill_signal_(0)
 {
   if(!cmds_.good())
     eraise(std::runtime_error) << "Failed to open cmds file '" << cmds << "'";
   if(!shell_)
     shell_ = getenv("SHELL");
   if(!shell_)
     shell_ = "/bin/sh";
 }