[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Basile STARYNKEVITCH <basile@s...> |
| Subject: | Re: [Caml-list] opening/reading a rtai fifo |
Le Wed, May 24, 2006 at 06:47:33PM +0200, julien.michel@etu.univ-orleans.fr écrivait/wrote:
> Hello,
> I currently work on an embedded system, OS Linux 2.4-19 RTAI .
>
> I'd like to open and read out an RTAI FIFO (called /dev/rtf/0)
> I used to do it with a "C" code such like:
> fd = open("/dev/rtf/0",O_RDONLY);
> read(fd,&f,sizeof(...)); etc...
>
> For now, I would like to do that with Ocaml. For instance, to begin, a reading
> of the FIFO's first line:
>
> let c = open_in "/dev/rtf/0" in
> let s = input_line c in
> print_string s;
> close_in c;
>
> While executing this code, the application seems to run continuously, without
> printing anything out whereas it works while using a single text file instead of
> the fifo.
Julien probably forgot a
flush stdout
at the end of his code. I sent him a longer email privately in french.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France