caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: julien.michel@etu.univ-orleans.fr
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] opening/reading a rtai fifo
Date: Wed, 24 May 2006 19:14:07 +0200	[thread overview]
Message-ID: <20060524171407.GB16984@ours.starynkevitch.net> (raw)
In-Reply-To: <1148489253.44748e25b2321@webmailetu.univ-orleans.fr>

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


  reply	other threads:[~2006-05-24 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 16:47 julien.michel
2006-05-24 17:14 ` Basile STARYNKEVITCH [this message]
2006-05-24 17:20 ` [Caml-list] " Eric Cooper
2006-05-24 17:32   ` Basile STARYNKEVITCH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060524171407.GB16984@ours.starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=julien.michel@etu.univ-orleans.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).