Show More
@@ -24,6 +24,9 b'' | |||
|
24 | 24 | # You should have received a copy of the GNU General Public License |
|
25 | 25 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
26 | 26 | |
|
27 | import os | |
|
28 | from rhodecode import __platform__, PLATFORM_WIN | |
|
29 | ||
|
27 | 30 | #============================================================================== |
|
28 | 31 | # json |
|
29 | 32 | #============================================================================== |
@@ -358,3 +361,19 b' class OrderedDict(_odict, dict):' | |||
|
358 | 361 | # OrderedSet |
|
359 | 362 | #============================================================================== |
|
360 | 363 | from sqlalchemy.util import OrderedSet |
|
364 | ||
|
365 | ||
|
366 | #============================================================================== | |
|
367 | # kill FUNCTIONS | |
|
368 | #============================================================================== | |
|
369 | if __platform__ in PLATFORM_WIN: | |
|
370 | import ctypes | |
|
371 | ||
|
372 | def kill(pid, sig): | |
|
373 | """kill function for Win32""" | |
|
374 | kernel32 = ctypes.windll.kernel32 | |
|
375 | handle = kernel32.OpenProcess(1, 0, pid) | |
|
376 | return (0 != kernel32.TerminateProcess(handle, 0)) | |
|
377 | ||
|
378 | else: | |
|
379 | kill = os.kill |
@@ -6,20 +6,7 b' import errno' | |||
|
6 | 6 | from warnings import warn |
|
7 | 7 | from multiprocessing.util import Finalize |
|
8 | 8 | |
|
9 | from rhodecode import __platform__, PLATFORM_WIN | |
|
10 | ||
|
11 | if __platform__ in PLATFORM_WIN: | |
|
12 | import ctypes | |
|
13 | ||
|
14 | def kill(pid, sig): | |
|
15 | """kill function for Win32""" | |
|
16 | kernel32 = ctypes.windll.kernel32 | |
|
17 | handle = kernel32.OpenProcess(1, 0, pid) | |
|
18 | return (0 != kernel32.TerminateProcess(handle, 0)) | |
|
19 | ||
|
20 | else: | |
|
21 | kill = os.kill | |
|
22 | ||
|
9 | from rhodecode.lib.compat import kill | |
|
23 | 10 | |
|
24 | 11 | class LockHeld(Exception): |
|
25 | 12 | pass |
General Comments 0
You need to be logged in to leave comments.
Login now