Message257199
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 |
|
Date |
User |
Action |
Args |
2015-12-29 17:24:19 | JanSpurny | set | recipients:
+ JanSpurny, martin.panter, kflavin |
2015-12-29 17:24:19 | JanSpurny | set | messageid: <1451409859.51.0.746676519265.issue22662@psf.upfronthosting.co.za> |
2015-12-29 17:24:19 | JanSpurny | link | issue22662 messages |
2015-12-29 17:24:19 | JanSpurny | create | |
|