From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA15765; Fri, 22 Nov 2002 16:29:27 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA16065 for ; Fri, 22 Nov 2002 16:29:25 +0100 (MET) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAMFTOX28701 for ; Fri, 22 Nov 2002 16:29:24 +0100 (MET) Received: from user-0cev2t6.cable.mindspring.com ([24.239.139.166] helo=[192.168.0.3]) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18FFk8-0004Ud-00 for caml-list@inria.fr; Fri, 22 Nov 2002 07:29:20 -0800 Subject: [Caml-list] really_input and non-blocking operations From: "Yaron M. Minsky" To: Caml List Content-Type: text/plain Organization: Cornell University Message-Id: <1037978958.12207.26.camel@dragonfly.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 22 Nov 2002 10:29:19 -0500 Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I just noticed that it's not safe to use really_input with nonblocking operations. In particular, as is clear from the source, if really_input fails in the middle of a read due to a Sys_blocked_io, it ends up discarding the what it's read so far. It seems like this should be noted in the documentation. Another documentation problem: the docs susggest that various unix errors will be thrown on blocked IO, but in my own experiments, the only exception I've seen thrown is Sys_blocked_io, which is not as far as I can tell mentioned anywhere in the docs. y ------------------- 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