slgobinath / uget-chrome-wrapper

Moved to https://github.com/ugetdm/uget-integrator and https://github.com/ugetdm/uget-extension
GNU General Public License v3.0
75 stars 14 forks source link

Provide subprocess with creationflags on Windows #50

Closed AirQuick closed 6 years ago

AirQuick commented 6 years ago

On Windows, Firefox puts the native application process (and effectively its child processes by default) into a job object. After the native application responds, Firefox kills all the processes in the job object including the uGet process launched by uget-chrome-wrapper. See the documentation.

So on Windows Firefox in many cases the uGet is killed as soon as launched.

This PR sets the process flag CREATE_BREAKAWAY_FROM_JOB on Windows so that the uGet process is created out of the job object and not killed together.

The flag constant is exposed on Python 3.7 which is too new. So this PR uses the raw numeric value instead.