Terminating CEF browser sub processes

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.

Terminating CEF browser sub processes

Postby rdh » Thu Jun 18, 2020 3:52 pm

I have CEF running in a Windows app and I use the recommended sub process approach. When I shutdown CEF in my app, all the sub processes close. I have exception handling so if my app crashes I can make the shutdown call from there if all goes well. But, of course, sometimes the exception is so bad that won't always work. Is there some way to configure CEF so that if my driving app exits abruptly, the cef sub processes are shut down?
rdh
Techie
 
Posts: 33
Joined: Wed Jun 10, 2020 3:18 pm

Re: Terminating CEF browser sub processes

Postby HarmlessDave » Thu Jun 18, 2020 3:57 pm

You could launch a separate watcher process and pass it the browser process process ID. The watcher process could check once every x seconds for all processes. If the browser process is gone then it closes all the other processes.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Terminating CEF browser sub processes

Postby amaitland » Thu Jun 18, 2020 3:59 pm

Having the subprocess monitor for the parent process exit and closing itself is the option I'd recommend.

viewtopic.php?f=6&t=15817&start=10#p37820
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

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