Re: [Cppcms-users] cppcms::service and system(..)
Brought to you by:
artyom-beilis
|
From: kpeo <sla...@ya...> - 2012-07-18 12:12:14
|
Ugh, never write a letter and especially code online, sorry ) (if it possible - please remove last my message from maillist)
"while" in function originally looks like this, but needs in timeout implementation:
while(fgets(buf, MAX_BUFFER, pipe) != NULL) {
out.append(buf);
}
See additionally:
Application Lifetime: http://cppcms.com/wikipp/en/page/cppcms_1x_application_lifetime
Thread Safety: http://cppcms.com/wikipp/en/page/thread_safety
Async programming: http://cppcms.com/wikipp/en/page/cppcms_1x_aio
Thread about background processes: http://comments.gmane.org/gmane.comp.lib.cppcms.user/1326
Regards,
kpeo
18.07.2012, 15:03, "Christian Gmeiner" <chr...@gm...>:
> Hi all,
>
> I would like to implement a Service class based on cppcms::service. I would like
> to trigger the rpc call via java script (works) and in the Service
> class I would like
> to use system() function to execute a bash script.
>
> If after executing/while executing the system function the cppcms apps
> hangs completely.
> My Service implements also a RPC call which does a reboot of the
> system - which works.
>
> Any idea what could went wrong?
>
> thanks
> ---
> Christian Gmeiner, MSc
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|