[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2017-01-06 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: [no status change, this issue currently does NOT need any attention] To keep issues separate, I just wanted to document a comment about this issue mentioned in issue29070. It refers to the _copy loop. if STDIN_FILENO in rfds: data =

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2017-01-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2017-01-02 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Status change: I proposed a generic test suite for pty.spawn() in issue29070. Once we have agreed on the current behavior of pty.spawn() and the test suite is merged, I would like to come back to this issue which requests for a change in behavior of

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-24 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Thank you Martin very much. To resolve this issue, I decided to document the current behavior and add test cases for it. No change in behavior is introduced. This hopefully allows to close this issue. The test cases for the current behavior ensure that we

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Martin Panter
Martin Panter added the comment: This is a change in behaviour of the _copy() loop: it will stop as soon as EOF is read from the parent’s input, and immediately close the terminal master. Unpatched, the loop continues to read output from the child, until the child closes the terminal slave.

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Make review tool happy by giving it less broken patch format :) `make patchcheck` is already happy. Sorry for the noise :( -- Added file: http://bugs.python.org/file46015/pty_and_tests.patch ___ Python tracker

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Review tool still did not show the test_pty.py file. Sry. -- Added file: http://bugs.python.org/file46013/pty.patch ___ Python tracker

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Removed git patch header from pty.patch to make python code review tool happy. Sorry, this is my first contribution. -- Added file: http://bugs.python.org/file46012/pty.patch ___ Python tracker

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: I wrote a proper patch for the issue of handling EOF in STDIN, including tests. My patch is against the github mirror head, but don't worry, the files I touch haven't been touched in recent years ;-) I only tested on Linux. My patch only addresses the

[issue29054] pty.py: pty.spawn hangs after client disconnect over nc (netcat)

2016-12-23 Thread Cornelius Diekmann
New submission from Cornelius Diekmann: My OS: Debian GNU/Linux 8.6 (jessie) Python 3.4.2 pty.py from Python-3.5.2/Lib (pty.py is just a tiny, portable python file which did not see many changes) Bug Report Steps to Reproduce: I wrote a very simple python remote shell: #!/usr/bin/env