Side Effects of CefInitialize

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Side Effects of CefInitialize

Postby illfang » Thu May 19, 2016 8:19 pm

I'm trying to integrate CEF into an existing framework on linux.
The framework provides a method which will execute a process and return the process exit status.
e.g.
Code: Select all
int exitStatus = Execute(command);

This works fine, however, after calling
Code: Select all
CefInitialize(main_args, settings, app.get(), NULL);

The same function will not return anymore and seems to be stuck trying to retrieve the exit code using waitpid.
The executed process will be marked as a <defunct> zombie process.

Code: Select all
CheckCEFHash(); // works fine, cef library loaded here
int exitStatus = Execute(command); // works fine
CefInitialize(args, settings, application, NULL); // works fine
int exitStatus = Execute(command); // does not return, a defunct zombie process remains


Besides this, everything is working OK so far and I'm able to create browsers using CEF.
I'm wondering what side effects CefInitialize could have which results in the lack of retrieving the exit code of the process afterwards.
Any hint would be greatly appreciated.
illfang
Newbie
 
Posts: 6
Joined: Thu May 19, 2016 7:52 pm

Re: Side Effects of CefInitialize

Postby magreenblatt » Thu May 19, 2016 10:10 pm

How does waitpid work? That might provide a hint.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Side Effects of CefInitialize

Postby illfang » Fri May 20, 2016 4:45 am

After debugging the framework more, it seems like waitpid is not getting called because the SIGCHILD handler function is not getting notified anymore after CefInitialize is called.
I guess it makes sense as CEF (I think, more likely Chromium) also wants to track its child processes.
I'm going to try to setup a third handler calling both handlers.

It would be interesting to know which signals are registered during the call.
illfang
Newbie
 
Posts: 6
Joined: Thu May 19, 2016 7:52 pm

Re: Side Effects of CefInitialize

Postby magreenblatt » Fri May 20, 2016 10:43 am

You can search the Chromium source code here: https://code.google.com/p/chromium/codesearch
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 61 guests