[issue25666] Python unexpectedly ignores a signal after fork

2015-11-19 Thread jon orebro

New submission from jon orebro:

Description:
I found a slight problem with signal handling. It seems that if you have a 
signal handler setup for a signal, right after a fork the child ignores that 
signal for a short time. This is regardless of what the signal handler is setup 
to do. This can cause hangs if the parent immediately kills and then waits for 
the child. Since the timeframe is small, in practice this only happens 
sometimes (se example). There might be a reason for this behavour, but in that 
case I think it should me mentioned in the docs.

What I expected:
I expected the child to, at any point in time, either do the default action for 
the signal (terminate in this case), or to run the signal handler.

What happens:
It ignores the signal for a short while.

Tested versions:
Python 2.7.6
Python 3.4.0

--
assignee: docs@python
components: Documentation, Interpreter Core
files: example.py
messages: 254890
nosy: docs@python, jon orebro
priority: normal
severity: normal
status: open
title: Python unexpectedly ignores a signal after fork
type: behavior
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file41074/example.py

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



[issue25633] The documentation for urllib.request should mention http.client.HTTPException

2015-11-16 Thread jon orebro

New submission from jon orebro:

The documentation for urllib.request should mention that a robust client using 
urllib.request must be prepared for exceptions of type 
http.client.HTTPException in addition to urllib.error.URLError.

Example: the server breaks HTTP and returns an empty status line and we get a 
http.client.BadStatusLine.

--
assignee: docs@python
components: Documentation
messages: 254720
nosy: docs@python, jon orebro
priority: normal
severity: normal
status: open
title: The documentation for urllib.request should mention 
http.client.HTTPException
type: behavior
versions: Python 3.4

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