[issue1257] atexit errors should result in nonzero exit code

2019-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

Antoine disagrees with the feature request, so I close it.

You can modify your atexit callbacks to catch exceptions and decide how to 
handle them: write them into a file, into stderr, etc.

--
nosy: +vstinner
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2013-08-18 Thread Doug Hellmann

Changes by Doug Hellmann doug.hellm...@gmail.com:


--
nosy: +doughellmann

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2013-08-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I would disagree with this report. There are many errors which are effectively 
silenced by Python, except for being printed on stderr: for example, errors 
which occur in a __del__ method or a weakref callback (both of which 
semantically similar to an atexit handler); but also exceptions which terminate 
a non-main thread.

Python's error code is derived from the return status of the main thread of 
execution, not counting any kinds of asynchronous exceptions, which are simply 
displayed and then ignored.

If you want to write a test for errors at program exit, you should check for 
stderr's contents (by capturing it).

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2013-06-24 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
assignee: christian.heimes - 
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2011-03-30 Thread ysj.ray

ysj.ray ysj@gmail.com added the comment:

I think there is no need to implement this in python2.x since it's a  behavior 
change which could introduce some compatibility issues to someone's code, 
besides in 2.x both sys.exitfunc and atexit module should be considered, that 
makes the code looks complex. The sys.exitfunc is removed in 3.x.

+1 on only implementing it in 3.3.

--
nosy: +ysj.ray
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2010-09-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

exit code = 128 + # of failed atexits

I don't agree with the feature. Do we need something so complex?

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2010-09-18 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Can someone please review the attached patch with a view to committing, it 
contains doc and unit test changes.

--
nosy: +BreamoreBoy
stage:  - patch review
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2010-06-09 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 
3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1257
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2008-05-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I'm assigning this to Christian because he was doing the GHOP review.

--
assignee: gvanrossum - christian.heimes
nosy: +benjamin.peterson

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2008-01-08 Thread Titus Brown

Titus Brown added the comment:

Please see GHOP patches by [EMAIL PROTECTED],

http://code.google.com/p/google-highly-open-participation-psf/issues/detail?id=215

I've attached the Python 2.6 patch here.

--
nosy: +titus
Added file: http://bugs.python.org/file9104/ghop-215-py2.6-ctb.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2007-11-19 Thread Christian Heimes

Christian Heimes added the comment:

The issue should be addressed in the C code.

--
assignee:  - gvanrossum
nosy: +gvanrossum, tiran
priority:  - normal

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Robert Brewer

New submission from 
Robert Brewer
:

While debugging/fixing the logging module's atexit behavior (see
http://www.cherrypy.org/ticket/646 -- it chokes atexit if stdout is
closed), it became difficult to write an automated test that verified
the bug occurred, since it happened at program exit. Returning a nonzero
exit code when atexit errors occur would be preferable to just printing
the error. Of course, if SystemExit is already raised, we should
propagate that out, but other exceptions should print the traceback and
then return some other code IMO.

--
components: Interpreter Core
messages: 56323
nosy: aminusfu
severity: normal
status: open
title: atexit errors should result in nonzero exit code
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Lakin Wecker

Lakin Wecker added the comment:

I am an agreeance with the original report.  I just finished writing an
automated test that did the following to work around this behavior:

46  # Sometimes an exception happens during exit, try to 
make
sure we get   
47  # a non_zero exit code. 
48  old_exitfunc = sys.exitfunc 
49  def exitfunc(): 
50  try: 
51  old_exitfunc() 
52  except SystemExit: 
53  raise 
54  except: 
55  raise SystemExit(1)

--
nosy: +lakin.wecker

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1257] atexit errors should result in nonzero exit code

2007-10-10 Thread Lakin Wecker

Lakin Wecker added the comment:

sorry for the noise and duplication.  The full code listing should have
been:

46  # Sometimes an exception happens during exit, try to 
make
sure we get   
47  # a non_zero exit code. 
48  old_exitfunc = sys.exitfunc 
49  def exitfunc(): 
50  try: 
51  old_exitfunc() 
52  except SystemExit: 
53  raise 
54  except: 
55  raise SystemExit(1) 
56  sys.exitfunc = exitfunc

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1257
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com