Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Sys_error("Bad file descriptor")
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: IKEDA Katsumi <ikeda@m...>
Subject: Re: [Caml-list] Sys_error("Bad file descriptor")
Hi,

From: IKEDA Katsumi <ikeda@msi.co.jp>
Message-ID: <20021111113157D.ikeda@msi.co.jp>
> ---------------- pslog.ml ----------------
> (* pslog.ml *)
> class log =
>   object
>   val mutable out = stderr
>   method log_open name =
>       out <- open_out_gen [Open_append;Open_creat] 0o666 name;
>   method log_close = close_out out
>   method write mes =
>       output_string out mes; flush out;
> end
> ---------------- pslog.ml ----------------

Sorry, I have a big mistake.

I try the following.

method log_open name =
      out <- open_out_gen [Open_append;Open_creat;Open_wronly] 0o666 name;

Now, it works.

Thanks.

-- 
IKEDA Katsumi  <ikeda@msi.co.jp>
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners