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] 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: 2002-10-01 (09:57)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Ocaml 3.06 bug
> 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).

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: