This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tomMoral
Recipients tomMoral
Date 2019-04-19.13:44:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555681441.41.0.870057455059.issue36668@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-04-19 13:44:01tomMoralsetrecipients: + tomMoral
2019-04-19 13:44:01tomMoralsetmessageid: <1555681441.41.0.870057455059.issue36668@roundup.psfhosted.org>
2019-04-19 13:44:01tomMorallinkissue36668 messages
2019-04-19 13:44:01tomMoralcreate