fopen doesn't return when opening a fifo!!

David Bateman David.Bateman at motorola.com
Tue Apr 1 03:08:19 CDT 2008


Petr Mikulik wrote:
>>> | Oppps, ok I figured it out.. I need to flush the stream to gnuplot
>>> | otherwise gnuplot doesn't open the fifo and its blocked as you say.. The
>>> | attached version of ginput.m works with Octave 3.1.x and versions of
>>> | gnuplot newer than 4.1.x.
>>>       
>
> Great! I've downloaded ginput.m from http://www.octave.org/hg/octave and 
> have it working in Octave 3.0. It works fine.
>
> Some comments:
>
> - You can remove this:
> ## This file initially bore the copyright statement
> ## Petr Mikulik
> ## History: June 2006; August 2005; June 2004; April 2004
> ## License: public domain
>   
I don't touch license statements when porting code. But sure we can
remove it if you're ok with that.

> - Remove this code, otherwise  ginput  (without input arguments)
>   does not work:
>
>   else
>     x = zeros (n, 1);
>     y = zeros (n, 1);
>     button = zeros (n, 1);
>   
Yes, I noticed and fixed that.. The fact is the version of ginput.m hat
John originally committed was sent in the couple of minutes before I
packed up and left, and as it was the first working version I wanted to
get it out there.. The latest version in the repository should be fine.

> - > the gnuplot command "pause mouse any" doesn't work in
>   > the Windows terminal..
>   It works correctly.
>   
I tried these functions with Michael's MSVC binary using gnuplot 4.2.2
and had issues. I had to modify ginput.m to force the "backend" variable
to be "gnuplot" as this property doesn't exist in Octave 3.0. However,
it caused some issues, and the ginput command locked up. I then tried to
use "pause mouse any" directly from gnuplot without using Octave at all
with the same result.. Were there some mouse support fixes for the
Windows terminal in gnuplot 4.2.3? Did you test this with Windows?

Basically, I think these function must work under the default terminal
types on Windows, Unix and Mac systems to be truly useful. And so hope
that with an upgrade to gnuplot 4.2.3 that this is possible.

> - The Windows binary distribution by Tatsuro MATSUOKA prefers to be run 
>   under cygwin, and the recommended terminal is X11.
>   Does that mean that within cygwin's bash, mkfifo() in Octave may work?
>   Or is mkfifo() not at all available in Octave's binary for MSW?
>   
Doing a quick google search for "cygwin mkfifo" and found

http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-July/068030.html

so cygwin doesn't implement the mkfifo function, or rather it does but
as a dummy function.  So I don't expect the mkfifo will work with
cygwin. That's why I was happy enough with the test "have_mkfifo =
!ispc();"

Regards
David

> ---
> Petr Mikulik
>
>   


-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



More information about the Bug-octave mailing list