Page 1 of 1

Subprocesses not closing

PostPosted: Thu Mar 04, 2021 2:57 pm
by whosefav
I've integrated CEF3 into a MFC application without multithreaded message loop, using a separate executable and using CefDoMessageLoopWork. It works well, however, I noticed that whenever I close a browser (browser->GetHost()->CloseBrowser(true)), instances of my subprocess do not close. So in the task manager it looks like this:

After calling CefInitialize (without opening a browser):
MyApp.exe
SubProcess.exe

After opening a browser:
MyApp.exe
SubProcess.exe
SubProcess.exe
SubProcess.exe
SubProcess.exe

After closing the browser:
MyApp.exe
SubProcess.exe
SubProcess.exe
SubProcess.exe

I was wondering if this was normal? The 3 remaining SubProcess.exe will remain there as long as I don't call CefShutdown(). I've tried to manually kill the processes, and nothing happens (app doesn't crash and I can still re-open a browser). I don't know if there's some resource I'm not properly disposing or if it's the expected behavior.

Thanks very much

Re: Subprocesses not closing

PostPosted: Thu Mar 04, 2021 4:55 pm
by magreenblatt
There are different types of subprocesses (network, gpu, etc). Those subprocesses will run until the application terminates.