Message9138
This is not currently possible. For details, please see
https://github.com/jythontools/jython/blob/master/Lib/subprocess.py#L865:
# Coupling stdin is not supported: there's no way to
# cleanly interrupt it if it blocks the
# _CouplerThread forever (we can Thread.interrupt()
# its _CouplerThread but that closes stdin's
# Channel)
pass
which means we don't have the ability to put a coupling thread to ensure simulating selectable, plus the underlying channel is buffered. Now there are other possibilities as seen in JRuby, with details given here: http://blog.headius.com/2013/06/the-pain-of-broken-subprocess.html
But as we see in the final analysis by Charlie Nutter, one hits a wall here.
For now, likely the best approach is to let CPython control the subprocess, then control the CPython with some other tooling like rpyc.
Perhaps Java 9 will offer some improvements, although it looks like http://openjdk.java.net/jeps/102 will be more limited. Let's revisit at that time. |
|
Date |
User |
Action |
Args |
2014-10-14 01:48:00 | zyasoft | set | messageid: <1413251280.3.0.355053295794.issue2218@psf.upfronthosting.co.za> |
2014-10-14 01:48:00 | zyasoft | set | recipients:
+ zyasoft, pekka.klarck |
2014-10-14 01:48:00 | zyasoft | link | issue2218 messages |
2014-10-14 01:47:59 | zyasoft | create | |
|