5 #include "externalaction.h"
10 int ExternalAction::check()
12 if(builder.get_dry_run())
22 if(waitpid(pid, &status, WNOHANG)==pid)
26 exit_code=WEXITSTATUS(status);
37 Starts the external program. Fill in argv before calling this.
39 void ExternalAction::launch()
41 if(builder.get_verbose()>=2)
43 for(StringList::const_iterator i=argv.begin(); i!=argv.end(); ++i)
52 if(builder.get_dry_run())
59 char *argv_[argv.size()+1];
60 for(CountingIterator<string, StringList::iterator> i=argv.begin(); i!=argv.end(); ++i)
61 argv_[i.count()]=strdup(i->c_str());
63 execvp(argv_[0], argv_);
64 cout<<"Couldn't execute "<<argv.front()<<'\n';