Edgewall Software

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10607 closed defect (fixed)

GitPlugin: Don't use Popen terminate() — at Version 4

Reported by: Peter Suter Owned by: Peter Suter
Priority: normal Milestone: 1.0
Component: plugin/git Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Properly terminate git subprocesses (fix Python 2.5 incompatibilities and Windows specific issues)

API Changes:
Internal Changes:

Description

Created as part of the move of GitPlugin. Tickets originally reported for th:GitPlugin: th:#9560, th:#9581, #9646

Replying to sjtoik:

popen.terminate have been introduced in python 2.6

Replying to Greg:

It seems that calling p[0].terminate() (on lines 744 and 760 of PyGIT.py) will fail with the access is denied message on Windows

Change History (4)

comment:1 by Peter Suter, 12 years ago

[11000] replaces subprocess.Popen.terminate() (which is only available since Python 2.6) with a quite ugly mix of win32api.TerminateProcess on Windows and os.kill() elsewhere.

I still get the access is denied errors on Windows, so I added a try: ... except: ... for that.

Any better ideas?

comment:2 by Peter Suter, 12 years ago

Milestone: 0.13
Resolution: fixed
Status: newclosed

[11031] fixes some Python 2.5 incompatibilities and replaces the use of pywin32 (win32api.TerminateProcess introduced in [11000] above) on Windows with ctypes, which is included with Python since 2.5. (These were also mentioned in th:#9560)

comment:3 by Peter Suter, 12 years ago

Owner: set to Peter Suter

comment:4 by Christian Boos, 12 years ago

Release Notes: modified (diff)
Note: See TracTickets for help on using tickets.