linux - issue with fork() from a firebreath npapi plugin -


i trying fork() new process can call separate console application.

the fork happen fine , new process id process in sleeping state , not active @ if browser exits.

i took sample plugin project , modified echo method fork.

a regular console application works fine fork code.

is there different has taken account firebreath plugin app?

can suggest might issue?

the platform archlinux 64 bit.

fb::variant plugintestvzapi::echo(const fb::variant& msg) {     static int n(0);     fire_echo("so far, clicked many times: ", n++);      // fork     pid_t pid = fork();     if(pid == 0) // child     {         m_host->htmllog("child process");     }     else if (pid < 0) // failed fork     {         m_host->htmllog("failed fork");         m_host->htmllog(boost::lexical_cast<std::string>(pid));     }     else // parent     {         m_host->htmllog("parent process");     }     m_host->htmllog("child process pid = " + boost::lexical_cast<std::string>(pid));     // end fork      // return "foobar";     return msg; } 

i can't if i'd try removing htmllog calls -- there no way access dom child process, htmllog won't work @ , quite possible trying use in forked process causing go inactive state while tries (unsuccessfully) communicate browser process doesn't know it.

i don't know if can work or not, i'd more bit nervous forking process child process of else; browser owns plugin process , communicates via ipc, if fork process there lot of code don't know still running , trying talk browser through now-defunct ipc connection.

my recommendation launch seperate process, that's me. @ least, absolutely cannot use firebreath provides communicating browser child process.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -