- Code: Select all
#include <Poco/Process.h>
class SubProcess{
public:
SubProcess(){
*handle = process.launch("ls", args);
}
~SubProcess(){
handle->wait();
}
private:
Poco::Process::Args args;
Poco::Process process;
Poco::ProcessHandle *handle;
};
- Code: Select all
#include "subprocess.hpp"
int main(int argc, char* argv[]){
SubProcess sub;
}
the problem is when program reaches the *handle= it show a SegmentFault message.
when I remove handle object from my code my class works good but I want to use handle in other methods in class.
what should I do for the handle?





