discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Pipe Tricks


From: James Cooley
Subject: Re: [Discuss-gnuradio] Pipe Tricks
Date: Wed, 06 Apr 2005 11:28:18 -0400
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

I had a similar thing.... I was using sockets, but then got it to work.

Are you sure the fd is staying in scope for the duration of the run?

-jamie




cswiger wrote:

Trying

 pipe_fd = open("/pipe","r")
 gr.file_descriptor_source(gr.sizeof_char,pipe_fd.fileno())

starts out but as soon as I start the source to fill the pipe
I get:

 file_descriptor_source[read]: Bad file descriptor

and the pipe filling script reports IOError: [Errno 32] Broken pipe

BTW, opening and reading the pipe manually in python works ok:
fd=open("/pipe","r")
a=fd.read(5)
a
'\xaa\xaa\xaa\xaa\xaa'


where \xaa is the expected idle character read w/o having to close
the pipe at the source. Again, using gr.file_source(pipe) works
fine but only after the source closes the pipe. Oh, and yes there
is fd.flush() after ever fd.write(chr(c)) in the source script.

--Chuck


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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