Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Ocaml 3.06 bug
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: olczyk@i...
Subject: Re: [Caml-list] Ocaml 3.06 bug
On Tue, 01 Oct 2002 11:57:28 +0200, Xavier Leroy
<xavier.leroy@inria.fr> wrote:

>> There is a bug in the Unix library, which makes my program exit with
>> no warning message.
>> 
>> It happens when I call Unix.write two times on a descriptor closed
>> by the other side.
>
>It's not an OCaml bug, it's a Unix feature.  Writes on a socket that
>corresponds to a closed connection generates a SIGPIPE signal, whose
>default effect is to kill your process.  
>
>There are ways to catch SIGPIPE or to replace it by an error code
>generated by Unix.write; please consult a Unix programming guide
>(e.g. Steven's books).
>
You are begging the question.
Reading Stevens won't help much if you don't know how signals are
handled in OCaml.
-------------------
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