Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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  Archives: