Skip to content
Permalink
Browse files

group kill is not available on windows, raise the same error as JRuby

  • Loading branch information
timfel committed Jul 19, 2013
1 parent 7b5b462 commit 975724fe6121e89bd806180630259874f0515db9
Showing with 7 additions and 2 deletions.
  1. +7 −2 topaz/modules/process.py
@@ -1,12 +1,13 @@
from __future__ import absolute_import

import errno
import os

from topaz.gateway import Coerce
from topaz.module import ModuleDef
from topaz.modules.signal import SIGNALS
from topaz.system import IS_WINDOWS
from topaz.error import error_for_oserror
from topaz.error import error_for_oserror, error_for_errno


if IS_WINDOWS:
@@ -17,11 +18,15 @@ def geteuid():
def fork():
raise NotImplementedError("fork on windows")

def killpg(pid, sigs):
raise error_for_errno(errno.EINVAL)

def WEXITSTATUS(status):
return status
else:
geteuid = os.geteuid
fork = os.fork
killpg = os.killpg
WEXITSTATUS = os.WEXITSTATUS


@@ -94,7 +99,7 @@ def method_kill(self, space, w_signal, args_w):
for w_arg in args_w:
pid = space.int_w(w_arg)
try:
os.killpg(pid, -sig)
killpg(pid, -sig)
except OSError as e:
raise error_for_oserror(space, e)
else:

0 comments on commit 975724f

Please sign in to comment.
You can’t perform that action at this time.