English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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