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

Popen blocks program from another thread #51442

Closed
dgriff1 mannequin opened this issue Oct 23, 2009 · 3 comments
Closed

Popen blocks program from another thread #51442

dgriff1 mannequin opened this issue Oct 23, 2009 · 3 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@dgriff1
Copy link
Mannequin

dgriff1 mannequin commented Oct 23, 2009

BPO 7193
Nosy @bitdancer
Files
  • subproc.py: A script to recreate bug
  • 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 2009-10-23.17:12:01.763>
    created_at = <Date 2009-10-23.15:47:37.291>
    labels = ['invalid', 'type-bug', 'library']
    title = 'Popen blocks program from another thread'
    updated_at = <Date 2009-10-23.17:12:01.762>
    user = 'https://bugs.python.org/dgriff1'

    bugs.python.org fields:

    activity = <Date 2009-10-23.17:12:01.762>
    actor = 'dgriff1'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-10-23.17:12:01.763>
    closer = 'dgriff1'
    components = ['Library (Lib)']
    creation = <Date 2009-10-23.15:47:37.291>
    creator = 'dgriff1'
    dependencies = []
    files = ['15189']
    hgrepos = []
    issue_num = 7193
    keywords = []
    message_count = 3.0
    messages = ['94389', '94390', '94391']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'dgriff1']
    pr_nums = []
    priority = 'low'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7193'
    versions = ['Python 2.6']

    @dgriff1
    Copy link
    Mannequin Author

    dgriff1 mannequin commented Oct 23, 2009

    When I create a thread that does a Popen it blocks the entire program. I
    have attached a simple sample program. Whether I do Popen.wait or
    Popen.poll the program blocks. I have done this on OSX 10.5 and 10.6. I
    have not yet tried ussing the multiprocessing module.

    @dgriff1 dgriff1 mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 23, 2009
    @bitdancer
    Copy link
    Member

    You are calling the 'run' method of your test class, which runs the
    subprocess in the main thread. Try calling t.start() instead.

    @dgriff1
    Copy link
    Mannequin Author

    dgriff1 mannequin commented Oct 23, 2009

    You are right, sorry to waste your time.

    @dgriff1 dgriff1 mannequin reopened this Oct 23, 2009
    @dgriff1 dgriff1 mannequin closed this as completed Oct 23, 2009
    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant