discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] subprocess.Popen produces error in main()


From: Kyle Zhou
Subject: [Discuss-gnuradio] subprocess.Popen produces error in main()
Date: Thu, 26 Nov 2009 11:42:55 +1100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Hi, I am trying to modify benchmark_rx.py such that it feeds to mplayer.

I can successfully use gr.file_descriptor_sink and pipe the stdout of python to stdin of mplayer.

However, when I try to embed the pipe in python code by calling mplayer programmably, it always produces errors.
The code changes are:

global n_rcvd, n_right, mplayer
def main():
   global n_rcvd, n_right, mplayer
   n_rcvd = 0
   n_right = 0
   mplayer = subprocess.Popen(['mplayer','-'],stdin=subprocess.PIPE)
def rx_callback(ok, payload):
       global n_rcvd, n_right, mplayer
       ......
       mplayer.stdin.write(payload[2:])


Upon the line subprocess.Popen(...), it produces the following error:

3 [main] python 5020 C:\cygwin\bin\python.exe: *** fatal error - unable to remap C:\cygwin\lib\python2.5\site-packages\gnuradio\vocoder\_cvsd_vocoder.dll
to same address as parent(0x1B260000) != 0x1B780000
5 [main] python 4344 fork: child 5020 - died waiting for dll loading, errn
o 11
Traceback (most recent call last):
 File "./benchmark_rx_mplayer.py", line 122, in <module>
   main()
 File "./benchmark_rx_mplayer.py", line 62, in main
mplayer = subprocess.Popen(['mplayer','-'],stdin=subprocess.PIPE,stderr=ferr
)
 File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
   errread, errwrite)
 File "/usr/lib/python2.5/subprocess.py", line 1011, in _execute_child
   self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable


I don't think this code is related to vocoder in anyway. So the error line 3 is really confusing.
I guess there is some conflict when fork a process within main(). But how?

Thanks

Kyle




reply via email to

[Prev in Thread] Current Thread [Next in Thread]