[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-11 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: I've opened it and it's fixed, so i'll close it now. If someone finds the single bug in 11650.termios-1.diff in termios_resume() and also has an idea of how to call termios_suspend() in case Python crashes or gives back the terminal in any other way i w

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-10 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Sat, Apr 09, 2011 at 02:18:01PM +, STINNER Victor wrote: > I noticied a strange behaviour: Still fun, but this one could even make it except for termios flags, multibyte and the real problem, signal handling. Hm. -- Added file: http://bu

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Sat, Apr 09, 2011 at 02:18:01PM +, STINNER Victor wrote: > I noticied a strange behaviour: So forget all this girlie s...! Here is a real man's patch!! You'll notice mysterious function calls with a Py prefix - they're necessary in this environme

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Davide Rizzo
Davide Rizzo added the comment: Victor, I have neither OS X nor Linux available right now, but if I remember correctly the same happens on both systems when programs call input() (but not from the REPL). See also my previous message with "python -c" tests and my second remark. What about the

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread STINNER Victor
STINNER Victor added the comment: I emulated Mac OS X behaviour on Linux by hacking my_fgets(): do { p=NULL; errno = EINTR; }, only after the first call to fgets(). Without the patch, Python does exit immediatly. With the patch, Python doesn't exit. I applied neologix's patch to 3.1, 3.2, 3.3

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Merci, STINNER Victor! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7febd5ef7619 by Victor Stinner in branch '2.7': (Merge 3.1) Issue #11650: PyOS_StdioReadline() retries fgets() if it was http://hg.python.org/cpython/rev/7febd5ef7619 -- ___ Python tracker

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset f343ac51 by Victor Stinner in branch '3.1': Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted http://hg.python.org/cpython/rev/f343ac51 New changeset fc2f251e660a by Victor Stinner in branch '3.2': (Merge 3.1) Issue #

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-04-09 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Ping! Note that whatever reason caused jesstess, to name a few, to drop that loop (and the continue), Charles-Francois posted a correctly working patch! I have no idea why such a severe bug could sleep in code which is executed for each and every input()

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-29 Thread Davide Rizzo
Davide Rizzo added the comment: An effective way to automate user interaction tests is by using pseudo-terminals. The attached test uses Pexpect and bash as tools to test the issue and demonstrates the bug on affected builds/platforms. There are a number of (possibly related) other issues tha

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: \|/ _ . | = Yes!? -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-25 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Fri, Mar 25, 2011 at 12:25:21PM +, Davide Rizzo wrote: > Some remarks here: > 1) the patch does fix it. Yes! I can't comment the rest except for what .. function:: input([prompt]) states, which Davide surely have read himself. Anyway it see

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-25 Thread Davide Rizzo
Davide Rizzo added the comment: The bugs seems not to be limited to the REPL. # Python 2.6 with readline on Mac OS X $ python -c "raw_input()" ^Z [1]+ Stopped python -c "raw_input()" $ fg python -c "raw_input()" Traceback (most recent call last): File "", line 1, in EOFError

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- nosy: +jesstess ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Michael Hudson
Michael Hudson added the comment: To be clear, I have no idea why the patch for issue 960406 removed the continue from my_fgets. It may have been simply a mistake. -- ___ Python tracker _

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: On Thu, Mar 23, 2011 at 21:50:42PM +, Davide Rizzo wrote: > Steffen, on a side note, I got readline working with brew. Say - readline not libedit which does not take care of .inputrc? Without permanently modifying GNU autoconf stuff? How do you do

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-24 Thread Davide Rizzo
Changes by Davide Rizzo : -- nosy: +mwh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread Davide Rizzo
Davide Rizzo added the comment: I couldn't get an automated test to fail on the bug with subprocess. Apparently an interpreter launched with Popen is not subject to the bug as it is when launched directly from the shell (i.e. fgets is not interrupted by a SIGSTOP sent by the parent process),

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread STINNER Victor
STINNER Victor added the comment: Sorry to ask that, but would it be possible to write an automated test for this issue? -- ___ Python tracker ___ _

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread Davide Rizzo
Davide Rizzo added the comment: The faulty behavior was presumably introduced in r36346, when the continue statement was removed. I already linked the relevant discussion, but I'm not sure whether that was a desired change or just an oversight. I'm inclined to believe the latter, as it wouldn

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: (Oh - when will i get this tracker right? Is there somewhere *real* documentation which applies to what actually happens?? Sorry once again, all of you!) -- ___ Python tracker

[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-23 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- components: -IO nosy: +akuchling title: CTRL-Z causes interpreter exit -> Faulty RESTART/EINTR handling in Parser/myreadline.c versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker