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 JanSpurny
Recipients JanSpurny, kflavin, martin.panter
Date 2015-12-29.17:24:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451409859.51.0.746676519265.issue22662@psf.upfronthosting.co.za>
In-reply-to
Content
I'm probably experiencing the same problem - and I've found a way to demonstrate it (almost) reliably:

    import multiprocessing
    import subprocess
    import os

    def x():
        fn = '/tmp/somevideo.avi'
        p = subprocess.Popen('mplayer -identify -frames 0 ' + fn, shell=True,
                             stderr=subprocess.PIPE, stdout=subprocess.PIPE)
        stdout, stderr = p.communicate('')

    os.system('stty -a > 1.txt')
    processes = []
    for i in xrange(2):
        p = multiprocessing.Process(target=x)
        p.start()
        processes.append(p)

    for p in processes:
        p.join()

    os.system('stty -a > 2.txt')
    os.system('diff 1.txt 2.txt')

The result is:

    < isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
    ---
    > isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt


when I replace the Popen call with:    

    p = subprocess.Popen(['mplayer', '-identify', '-frames', '0', fn], shell=False,

the problem is no longer there (diff prints nothing).

It's clear that the problem is caused by mplayer, which usualy runs
interactively and captures user's input.. but I'm pretty sure it's still a bug.

I'm using Debian 8.2, amd64, python2.7.9
History
Date User Action Args
2015-12-29 17:24:19JanSpurnysetrecipients: + JanSpurny, martin.panter, kflavin
2015-12-29 17:24:19JanSpurnysetmessageid: <1451409859.51.0.746676519265.issue22662@psf.upfronthosting.co.za>
2015-12-29 17:24:19JanSpurnylinkissue22662 messages
2015-12-29 17:24:19JanSpurnycreate