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] pipe communication with toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-05 (09:40)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] pipe communication with toplevel
> I'm doing a graphical ocaml toplevel wrapper for OS X, it's working 
> except when I type in bad syntax,
> then the ocaml toplevel background process that I'm communicating with 
> quits or dies, I don't know why.  I've got the toplevel's standard 
> in,out, and error redirected to pipes that the graphical shell is using 
> for communication with it.  The session is fine until bad input is 
> finally typed.  Any ideas about why it quits like that?
> Is it checking isatty() or similar on stdin and deciding there's no 
> human  so better to just quit upon error?

There is no such checking in the Caml code for the toplevel.
However, the toplevel calls termcap or terminfo functions to try and
underline graphically the error.  Maybe these functions have a bug?
Try setting the TERM variable to "dumb" or "none" before starting the
toplevel, e.g. launch it with
        /bin/sh -c "TERM=dumb ocaml"

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