Mercurial > ~astiob > upreckon > hgweb
diff unix.py @ 134:e84f33a60a5c
Moved process killing logic into platform-specific modules
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Fri, 20 May 2011 14:47:42 +0100 |
parents | 580f0f4687c3 |
children | ed4035661b85 |
line wrap: on
line diff
--- a/unix.py Thu May 19 16:50:00 2011 +0100 +++ b/unix.py Fri May 20 14:47:42 2011 +0100 @@ -22,7 +22,7 @@ SIGTERM = 15 SIGKILL = 9 -__all__ = 'call', 'kill', 'terminate', 'wait', 'pause', 'clock' +__all__ = 'call', 'kill', 'pause', 'clock' if not sys.stdin.isatty(): @@ -291,13 +291,7 @@ process.kill() except AttributeError: os.kill(process.pid, SIGKILL) - - -def terminate(process): - try: - process.terminate() - except AttributeError: - os.kill(process.pid, SIGTERM) + wait(process) # subprocess in Python 2.6- is not guarded against EINTR