English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2001-04-09 (09:08)
From: wester@i...
Subject: [Caml-list] Sys_error "Bad file descriptor"

I try to open a file with append mode. Opening and writing to the file 
works but when I try to flush or close the file I get an error message:

let h_out = open_out_gen ~mode:[Open_append; Open_creat] ~perm:666 "f1.txt";;
Printf.fprintf h_out "%s" "something";;
close_out h_out;;

Uncaught exception: Sys_error "Bad file descriptor".

I'm running OCaml 3.1 on Windows NT 4.0. Any help is appreciated.

Rolf Wester  
Rolf Wester
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr