Renderer process PID = 1

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.

Renderer process PID = 1

Postby Fdominguez » Tue Nov 05, 2019 9:35 am

Hi.

Im trying to identify the specific PID at where the renderer process is running and I'm getting a PID of 1 which does not make sense as 1 usually means the initialization of Linux

I used getpid() and I also used context->GetBrowser()->GetIdentifier() inside my RenderApp::OnContextCreated() method.

Can I get a bit of an explanation of how the CEF processes and threads work? I've read the general usage wiki a couple times but I dont quite get why the PID would be 1

Thanks
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm

Re: Renderer process PID = 1

Postby magreenblatt » Tue Nov 05, 2019 10:16 am

The CefBrowser::GetIdentifier() method returns an incremental value that's specific to CEF. I think the getpid() function should return whatever the OS thinks is the process ID, and should probably be the same value that you see with a command like `ps -ax`. It's possible that the Chromium sandbox interferes with the getpid() function in some way but I'm not aware of any specific details.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Renderer process PID = 1

Postby Fdominguez » Tue Nov 05, 2019 10:43 am

magreenblatt wrote:The CefBrowser::GetIdentifier() method returns an incremental value that's specific to CEF. I think the getpid() function should return whatever the OS thinks is the process ID, and should probably be the same value that you see with a command like `ps -ax`. It's possible that the Chromium sandbox interferes with the getpid() function in some way but I'm not aware of any specific details.


I see.

I ran the program with the --no-sandbox command and this time did give me the right PID. Therefore,unless is not the browser process I can't rely on the kernel functions due to the CEF sandbox.

Thanks
Fdominguez
Newbie
 
Posts: 6
Joined: Wed Oct 30, 2019 4:43 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 34 guests