Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Popen objects to _active only in __del__, #43185

Closed
atila-cheops mannequin opened this issue Apr 10, 2006 · 3 comments
Closed

add Popen objects to _active only in __del__, #43185

atila-cheops mannequin opened this issue Apr 10, 2006 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@atila-cheops
Copy link
Mannequin

atila-cheops mannequin commented Apr 10, 2006

BPO 1467770
Nosy @loewis
Files
  • subprocess.py.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2006-04-10.16:05:10.000>
    created_at = <Date 2006-04-10.14:54:48.000>
    labels = ['library']
    title = 'add Popen objects to _active only in __del__, '
    updated_at = <Date 2006-04-10.16:05:10.000>
    user = 'https://bugs.python.org/atila-cheops'

    bugs.python.org fields:

    activity = <Date 2006-04-10.16:05:10.000>
    actor = 'loewis'
    assignee = 'astrand'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2006-04-10.14:54:48.000>
    creator = 'atila-cheops'
    dependencies = []
    files = ['7145']
    hgrepos = []
    issue_num = 1467770
    keywords = ['patch']
    message_count = 3.0
    messages = ['49980', '49981', '49982']
    nosy_count = 3.0
    nosy_names = ['loewis', 'astrand', 'atila-cheops']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1467770'
    versions = ['Python 2.5']

    @atila-cheops
    Copy link
    Mannequin Author

    atila-cheops mannequin commented Apr 10, 2006

    attached a patch for subprocess.py
    this is for bug bpo-1460493 Why not drop the _active list?
    popen2.py is patched (revision 43286), this is a (try)
    to patch subprocess.py accordingly.
    Bug bpo-1183780: Add Popen objects to _active only in __del__.
    Cleanup terminated processes as well.

    revision 43287 adds a small modification with an
    assert, but that is not included.

    I'm not sure about the wait(self) function under the
    windows part, there is no check for an error, and the
    _deadstate protection is not used

    verified on windows XP SP2 32bits (python2.4 with
    patched subprocess.py from 2.5a1) with the
    'popen_bug.py -s '-script from bug bpo-1183780 but with
    the following call: pipe = subprocess.Popen("calc")
    then in windows xp do a "close group" action on all the
    calculator windows (right click on the task bar).

    @atila-cheops atila-cheops mannequin closed this as completed Apr 10, 2006
    @atila-cheops atila-cheops mannequin assigned astrand Apr 10, 2006
    @atila-cheops atila-cheops mannequin added the stdlib Python modules in the Lib dir label Apr 10, 2006
    @atila-cheops atila-cheops mannequin closed this as completed Apr 10, 2006
    @atila-cheops atila-cheops mannequin assigned astrand Apr 10, 2006
    @atila-cheops atila-cheops mannequin added the stdlib Python modules in the Lib dir label Apr 10, 2006
    @atila-cheops
    Copy link
    Mannequin Author

    atila-cheops mannequin commented Apr 10, 2006

    Logged In: YES
    user_id=1276121

    patch was not uploaded

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Apr 10, 2006

    Logged In: YES
    user_id=21627

    Thanks for the patch. I made a number of modifications:

    • add poll(_deadstate) argument for Unix
    • trace whether a child was actually created, else
      returncode would not have been set (not even to None) in __del__
      With these modifications, I committed it as r45234.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants