caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* opening/reading a rtai fifo
@ 2006-05-24 16:47 julien.michel
  2006-05-24 17:14 ` [Caml-list] " Basile STARYNKEVITCH
  2006-05-24 17:20 ` Eric Cooper
  0 siblings, 2 replies; 4+ messages in thread
From: julien.michel @ 2006-05-24 16:47 UTC (permalink / raw)
  To: caml-list

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.
It behaves like if the input_line function failed to get the end of line
character or whatever...
The same thing occurs using the "input_char" or "open_in_bin" functions...

Would anybody know the convenient functions to perform that ?

Thanks a lot


-- 
MICHEL Julien








^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-24 17:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-24 16:47 opening/reading a rtai fifo julien.michel
2006-05-24 17:14 ` [Caml-list] " Basile STARYNKEVITCH
2006-05-24 17:20 ` Eric Cooper
2006-05-24 17:32   ` Basile STARYNKEVITCH

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).