From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C1D83BB83 for ; Wed, 24 May 2006 18:47:25 +0200 (CEST) Received: from ka.univ-orleans.fr (ka.univ-orleans.fr [193.49.83.5]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4OGlPWk009556 for ; Wed, 24 May 2006 18:47:25 +0200 Received: from localhost (localhost [127.0.0.1]) by ka.univ-orleans.fr (Postfix) with ESMTP id BCFC312AD7D for ; Wed, 24 May 2006 18:47:25 +0200 (CEST) Received: from 81.80.205.253 ([81.80.205.253]) by webmailetu.univ-orleans.fr (IMP) with HTTP for ; Wed, 24 May 2006 18:47:33 +0200 Message-ID: <1148489253.44748e25b2321@webmailetu.univ-orleans.fr> Date: Wed, 24 May 2006 18:47:33 +0200 From: julien.michel@etu.univ-orleans.fr To: caml-list@yquem.inria.fr Subject: opening/reading a rtai fifo MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 81.80.205.253 X-j-chkmail-Score: MSGID : 44748E1D.000 on concorde : j-chkmail score : XX : 5/20 0 X-Miltered: at concorde with ID 44748E1D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; univ-orleans:01 sizeof:01 ocaml:01 behaves:01 continuously:98 char:01 michel:01 michel:01 functions:01 functions:01 dev:01 dev:01 bin:01 string:02 seems:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=NO_REAL_NAME autolearn=disabled version=3.0.3 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