[issue23242] asyncio: Process must close the transport when the process exit

2017-01-07 Thread Alex Grönholm

Alex Grönholm added the comment:

Are you sure this has been fixed? The attached script reproduces the bug 100% 
reliably on my laptop.

--
Added file: http://bugs.python.org/file46198/read_subprocess.py

___
Python tracker 

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



[issue23242] asyncio: Process must close the transport when the process exit

2017-01-07 Thread Alex Grönholm

Changes by Alex Grönholm :


--
nosy: +alex.gronholm
versions: +Python 3.6

___
Python tracker 

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



[issue23242] asyncio: Process must close the transport when the process exit

2015-01-15 Thread STINNER Victor

STINNER Victor added the comment:

 I'm not sure that it's the most efficient way to close the transport. It may 
 be better to close the transport in the connection_lost() method of the 
 protocol.

process_exited, not connection_lost.

I implemented this option which is simpler and more efficient (always and 
immediatly close the transport).

Clearing the reference to the transport in the Process is less important, it 
can be done later in a different issue/changeset. I close this issue.

--
resolution:  - fixed
status: open - closed

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



[issue23242] asyncio: Process must close the transport when the process exit

2015-01-14 Thread STINNER Victor

New submission from STINNER Victor:

The asyncio.subprocess.Process class never closes the subprocess transport, 
whereas this transport is private.

I propose to close the transport as soon as possible: when 
transport.get_returncode() is called and its result is not None.

I'm not sure that it's the most efficient way to close the transport. It may be 
better to close the transport in the connection_lost() method of the protocol.

The patch also checks in Process.communicate() that the process is alive, and 
is clears the reference to the transport.

--
components: asyncio
files: subprocess_close.patch
keywords: patch
messages: 234042
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: Process must close the transport when the process exit
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37707/subprocess_close.patch

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