[issue36668] semaphore_tracker is not reused by child processes

2019-04-24 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 004b93ea8947bcbe85b6fa16fe0999bfa712d5c1 by Antoine Pitrou 
(Thomas Moreau) in branch 'master':
bpo-36668: FIX reuse semaphore tracker for child processes (#5172)
https://github.com/python/cpython/commit/004b93ea8947bcbe85b6fa16fe0999bfa712d5c1


--

___
Python tracker 

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



[issue36668] semaphore_tracker is not reused by child processes

2019-04-24 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
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



[issue36668] semaphore_tracker is not reused by child processes

2019-04-19 Thread SilentGhost


Change by SilentGhost :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue36668] semaphore_tracker is not reused by child processes

2019-04-19 Thread Thomas Moreau


Change by Thomas Moreau :


--
keywords: +patch
pull_requests: +12805
stage:  -> patch review

___
Python tracker 

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



[issue36668] semaphore_tracker is not reused by child processes

2019-04-19 Thread Thomas Moreau


New submission from Thomas Moreau :

The current implementation of the semaphore_tracker creates a new process for 
each children.

The easy fix would be to pass the _pid to the children but the current 
mechanism to check if the semaphore_tracker is alive relies on waitpid which 
cannot be used in child processes (the semaphore_tracker is only a sibling of 
these processes). The main issue is to have a reliable check that either:

The pipe is open. This is what is done here by sending a message. I don't 
know if there is a more efficient way to check it.
Check that a given pid is alive. As we cannot rely on waitpid, I don't see 
an efficient mechanism.

I propose to add a PROBE command in the semaphore tracker. When the pipe is 
closed, the send command will fail, meaning that the semaphore tracker is down.

--
components: Library (Lib)
messages: 340543
nosy: tomMoral
priority: normal
severity: normal
status: open
title: semaphore_tracker is not reused by child processes
type: behavior
versions: Python 3.8

___
Python tracker 

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