Mercurial > hg
comparison mercurial/win32.py @ 40928:576474baa209
win32: close the handles associated with a spawned child process
Probably not a big deal because at this point, the call is only used when
spawning a daemonized server. In that case, the parent process goes away first,
so it won't prevent the child from being cleaned up.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 11 Dec 2018 21:57:54 -0500 |
parents | 24e493ec2229 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
40927:c9c10430fd7f | 40928:576474baa209 |
---|---|
586 None, encoding.strtolocal(args), None, None, False, _CREATE_NO_WINDOW, | 586 None, encoding.strtolocal(args), None, None, False, _CREATE_NO_WINDOW, |
587 env, encoding.getcwd(), ctypes.byref(si), ctypes.byref(pi)) | 587 env, encoding.getcwd(), ctypes.byref(si), ctypes.byref(pi)) |
588 if not res: | 588 if not res: |
589 raise ctypes.WinError() | 589 raise ctypes.WinError() |
590 | 590 |
591 _kernel32.CloseHandle(pi.hProcess) | |
592 _kernel32.CloseHandle(pi.hThread) | |
593 | |
591 return pi.dwProcessId | 594 return pi.dwProcessId |
592 | 595 |
593 def unlink(f): | 596 def unlink(f): |
594 '''try to implement POSIX' unlink semantics on Windows''' | 597 '''try to implement POSIX' unlink semantics on Windows''' |
595 | 598 |