Message9143
How could signal module be used here? Doesn't it only contain signal constants, a function to register signal handlers, and some UNIX only functions to set timers and alarms?
It seems to me that really supporting `send_signal` on any platform would require `os.kill` (currently missing) and `Popen.pid` (always None). I know supporting these on JVM is far from trivial, but on the other hand these features would be very useful also independently.
I totally understand if fixing this is impossible in Jython 2.7.0 timeline. In that case it would probably be a good idea to change to code to just this:
def send_signal(self, sig):
if sig == signal.SIGTERM:
self.terminate()
raise ValueError("Unsupported signal: {}".format(sig))
It seems that JVM actually sends SIGTERM on POSIX when calling `process.destroy()` (like `self.terminate()` does), and on Windows sending SIGTERM is anyway just an alias for terminating the process also on CPython. |
|
Date |
User |
Action |
Args |
2014-10-14 09:20:22 | pekka.klarck | set | messageid: <1413278422.93.0.0587309220192.issue2219@psf.upfronthosting.co.za> |
2014-10-14 09:20:22 | pekka.klarck | set | recipients:
+ pekka.klarck, zyasoft |
2014-10-14 09:20:22 | pekka.klarck | link | issue2219 messages |
2014-10-14 09:20:22 | pekka.klarck | create | |
|