Can't set sub process path on linux

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.

Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 9:57 am

Hi,

I am trying to embedded CEF3 with a SWT container on Linux, but I wasn't able to set the sub process path with the CefSettings object when calling the CefInitialize method. It looks like the ZygoteHostImpl::Init didn't resolve the sub process correctly. My app works on Windows, perhaps it is going through a different code path when spawning a child process.

I am using chromium build 27.0.1453.47.

Regards,
Patrick
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Re: Can't set sub process path on linux

Postby magreenblatt » Tue May 14, 2013 11:15 am

Setting a sub-process path works for me on Linux. Are you specifying the full path to the executable?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 12:16 pm

Yes, I am passing the fullpath. Are you setting the path through command line argument or through the CefSetting object?
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Re: Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 2:28 pm

My main process is java.exe, which execute my java code, and my child process is child.exe. When I use the command line switch or setting the browser_subprocess_path with the CefSetting, I see 3 java.exe processes, and my child process child.exe is not listed. It looks like my child.exe is never spawned/forked.
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Re: Can't set sub process path on linux

Postby fddima » Tue May 14, 2013 2:56 pm

pchuong wrote:My main process is java.exe, which execute my java code, and my child process is child.exe. When I use the command line switch or setting the browser_subprocess_path with the CefSetting, I see 3 java.exe processes, and my child process child.exe is not listed. It looks like my child.exe is never spawned/forked.

java.exe on linux?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 3:08 pm

Sorry, not java.exe, I mean the java process. I am a Windows guy :oops:

From what I can tell from debugging, the child process was never spawn. I do see the java process is forked twice, once in the sandbox and once in zygote. The browser_subprocess_path was never use.
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Re: Can't set sub process path on linux

Postby fddima » Tue May 14, 2013 3:25 pm

pchuong wrote:Sorry, not java.exe, I mean the java process. I am a Windows guy :oops:

From what I can tell from debugging, the child process was never spawn. I do see the java process is forked twice, once in the sandbox and once in zygote. The browser_subprocess_path was never use.

child.exe it is native process, or it is java application too?
It is works before for you? Or you get it just now?
I'm can't test on linux just now, 'cause needed to built fresh version of cef (x86)...
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 3:52 pm

child.exe is a native process. I am trying to port my existing code from Windows to Linux, and I am not able to get it to work. On Windows, everything is working as expected. On linux, I modified the zygote code to launch the child.exe and the browser comes up. However, I see random crashes. So, I debugger the issue and found out that the java process is forked. This might or might not be the cause of the crashes that I am experiencing.

Was Cef3 work on linux in the past where the child process is implemented in a different executable?
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Re: Can't set sub process path on linux

Postby fddima » Tue May 14, 2013 4:11 pm

pchuong wrote:child.exe is a native process. I am trying to port my existing code from Windows to Linux, and I am not able to get it to work. On Windows, everything is working as expected. On linux, I modified the zygote code to launch the child.exe and the browser comes up. However, I see random crashes. So, I debugger the issue and found out that the java process is forked. This might or might not be the cause of the crashes that I am experiencing.

Was Cef3 work on linux in the past where the child process is implemented in a different executable?

It must work. Your's problem it is may be some kind of CEF regression.
In general zygote process is evil process, it is probably can be disabled. Zygote process exists *only* for one target - it holds handles on right versions of dynamic libraries, so browser always will work with same libraries, even when browser updated (in linux dynamic libraries is not locked, like in windows).
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Can't set sub process path on linux

Postby pchuong » Tue May 14, 2013 4:18 pm

How do I disable zygote?
pchuong
Mentor
 
Posts: 73
Joined: Tue Nov 06, 2012 1:41 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 58 guests