pulse-browser / browser

Pulse Browser: An experimental firefox fork
https://pulsebrowser.app/
Mozilla Public License 2.0
762 stars 44 forks source link

Child process #292

Open trimechee opened 9 months ago

trimechee commented 9 months ago

Hello, i hope to use this extension to open media player to play youtube videos and video from other sites :

https://github.com/andy-portmen/external-application-button/

the problem with firefox based browser, we can open video of the browser wih media player but there is child process in the background and when we close firefox, the media player closes , we hope Pulse-Browser will fix this big problem, chromium browsers doesnt have this problem, thank you !

https://webextension.org/listing/external-application-button.html

Maybe it can help :

""As I have already stated, there is no fix for this (or at least I am not aware of a way to fix this). Firefox just opens all the executables as its own child process and when the parent process is getting closed, all the sub-processes are being closed. You can still play around with the NodeJS native client which is basically very simple JavaScript code and see if you can find a way to prevent this to happen. "

"[Firefox Only] Can you explain why all the applications executed from this extension in Firefox get closed when the browser is closed? Is there a way to prevent this from happening?

This behavior relates to how Firefox handles native applications as child processes of Firefox. When the parent process is closed, the operating system (Windows only) kills all the child processes, including those launched by this extension. There is no easy way to bypass this restriction. However, a workaround is to use a third-party program called RunFromProcess by NirSoft that can change the parent process of a child process. You can call this program instead of your native one and ask it to assign another parent process for the application. By doing this, when Firefox is closed, the os does not kill the child process because its parent is still running. You can set a persistent process such as "explorer.exe" as the parent to prevent it from being closed later."