7 #include <boost/interprocess/ipc/message_queue.hpp>
27 prctl( PR_SET_PDEATHSIG, SIGHUP );
34 Process::Process(
pid_t pid ) : m_inbox(), m_outbox(), m_pid(
pid )
40 m_inbox(
other.m_inbox ), m_outbox(
other.m_outbox ), m_pid(
other.m_pid )
47 if (
this != &
other ) {
69 if ( !
queue.name().empty() ) {
80 if ( !
queue.name().empty() ) {
92 std::string strptr(
"");
94 size_t ptrsize =
sizeof(func);
95 char* charptr =
new char[ptrsize];
96 memcpy(charptr,&func,ptrsize);
97 strptr=std::string(charptr,ptrsize);
104 std::string strparam = (
args?std::string((
char*)
args->data,
args->size):std::string(
""));
111 int Process::mainloop() {
138 std::unique_ptr<ScheduledWork> outwork = (*decoder)(
params);
141 bool posted =
m_outbox.
try_send(std::string((
char*)outwork->data,outwork->size));
144 int errflag = *((
int*)outwork->data);