Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit 9117b94

Browse files
authored
Merge pull request #50 from AirQuick/creation_flags
Provide subprocess with creationflags on Windows
2 parents 6b86a1f + 3cf291e commit 9117b94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

uget-chrome-wrapper/bin/uget-chrome-wrapper

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ cookie_filepath = join(tempfile.gettempdir(), 'uget_cookie')
3737
urls_filepath = join(tempfile.gettempdir(), 'uget_urls')
3838
UGET_COMMAND = "uget-gtk"
3939
VERSION = "2.0.7"
40+
creation_flags = 0
4041

4142
logger = logging.getLogger()
4243
# log_file_path = join(expanduser('~'), 'uget-chrome-wrapper.log')
@@ -51,6 +52,8 @@ if sys.platform == 'win32':
5152
msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
5253
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
5354
UGET_COMMAND = 'uget'
55+
# CREATE_BREAKAWAY_FROM_JOB
56+
creation_flags |= 0x01000000
5457

5558

5659
def extract_file_name(url):
@@ -208,7 +211,7 @@ def read_message():
208211

209212
logger.debug('Execute command: ' + str(command))
210213
# Pass the parameters to uGet
211-
subprocess.call(command)
214+
subprocess.Popen(command, creationflags=creation_flags).wait()
212215

213216
if use_cookie_file:
214217
try:

0 commit comments

Comments
 (0)