[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-10-13 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-04-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Because calling exit() is the right way to end a process. For example, > it does the following: > - atexit()-registered finalizers are run > - stdio streams are flushed and closed (although it could probably > done by the interpreter) > - files created with tm

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: >> I agree with Martin: we really do handle the signal, and as such, the >> only way to convey the relevant information to the parent as to which >> signal caused the exit would be to re-raise it, which is really ugly >> and probably not a good idea. >

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I agree with Martin: we really do handle the signal, and as such, the > only way to convey the relevant information to the parent as to which > signal caused the exit would be to re-raise it, which is really ugly > and probably not a good idea. Why would it b

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-20 Thread Charles-François Natali
Charles-François Natali added the comment: I agree with Martin: we really do handle the signal, and as such, the only way to convey the relevant information to the parent as to which signal caused the exit would be to re-raise it, which is really ugly and probably not a good idea. Processes tha

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Since Python *does* handle the signal, and exits "regularly", we > shouldn't You are arguing from a legal point of view, but from a pratical point of view Python doesn't really "handle" the signal: it just defers the exit until after all internal structures

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-10 Thread Éric Araujo
Éric Araujo added the comment: The Debian bug has some more convincing examples: > any Python program which is expected to implement the interface of (say) > "diff" is buggy, because > it may exit status 1 ("comparison successful; differences found") when it > should have died with > SIGINT (

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-09 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: (faulthandler works around that problem by restoring the previous signal handler and calling raise(), apparently) -- ___ Python tracker ___ __

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another problem with my suggestion is that C exit() ANDs the status with 255 before transmitting it to the parent. -- ___ Python tracker ___ _

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm not so sure that Python is in violation of the convention here. The exit code should report *unhandled* signals, indicating that the process didn't provide an exit code at all (as it didn't call exit(2)). You are supposed to use WIFEXITED/WIFSIGNALED/WIF

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-08 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14229] On KeyboardInterrupt, the exit code should mirror the signal number

2012-03-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : Compare: $ ./python -c "import subprocess, signal, time; p = subprocess.Popen(['cat']); time.sleep(1); p.send_signal(signal.SIGINT); print(p.wait())" -2 with: $ ./python -c "import subprocess, signal, time; p = subprocess.Popen(['python', '-c', 'input()']