From: Jim B. <jim...@py...> - 2014-05-15 22:24:36
|
Sounds like a great plan for beta 4! - Jim On Thu, May 15, 2014 at 4:48 PM, Pekka Klärck <pe...@ik...> wrote: > 2014-05-12 0:57 GMT+03:00 Michael Büsch <m...@bu...>: > > > > I'm using latest jython hg sources (2.7). > > My code uses subprocess.Popen() and eventually calls terminate() on the > object. > > This fails with the following exception: > > > >> Traceback (most recent call last): > >> File "/home/mb/develop/git/awlsim/./tests/../awlsimcli", line 424, in > <module> > >> sys.exit(main()) > >> File "/home/mb/develop/git/awlsim/./tests/../awlsimcli", line 420, in > main > >> return runWithServerBackend(inputFile) > >> File "/home/mb/develop/git/awlsim/./tests/../awlsimcli", line 274, in > runWithServerBackend > >> client.shutdown() > >> File "/home/mb/develop/git/awlsim/awlsim/coreserver/client.py", line > 115, in shutdown > >> self.serverProcess.terminate() > >> File "/home/mb/develop/hg/jython/dist/Lib/subprocess.py", line 1399, > in terminate > >> _subprocess.TerminateProcess(self._handle, 1) > >> NameError: global name '_subprocess' is not defined > > > > This looks like a bug in the subprocess module. > > Neither 'terminate' nor 'kill' nor 'send_signal' are currently > supported by Jython, and I would assume that possible Popen > configuration parameters added in Python 2.6 or 2.7 aren't supported > either. I have understood that supporting everything CPython does is > problematic due to JVM limitations (e.g. signals aren't officially > supported), but it ought to be possible to implement at least 'kill' > by just terminating the started process via the Java API. With CPython > 'terminate' sends SIGTERM signal on posix, so if signals aren't > supported implementing it that way is not possible. Implementing > 'terminate' as an alias for 'kill', like CPython does on Windows, > ought to be a good enough workaround. > > I would love to see at least 'kill' and 'terminate' included into > Jython 2.7. Anyone interested to work with me getting them > implemented? > > Cheers, > .peke > -- > Agile Tester/Developer/Consultant :: http://eliga.fi > Lead Developer of Robot Framework :: http://robotframework.org > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > |