caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] pipe communication with toplevel
@ 2002-08-04  5:09 Steve Harris
  2002-08-05  9:40 ` Xavier Leroy
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Harris @ 2002-08-04  5:09 UTC (permalink / raw)
  To: caml-list

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?
Sys.interactive is already true here.

BTW I'll post it when done in case anybody else is fed up with the 
terminal and terminal-embedded-emacs on OS X like me :)

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] pipe communication with toplevel
  2002-08-04  5:09 [Caml-list] pipe communication with toplevel Steve Harris
@ 2002-08-05  9:40 ` Xavier Leroy
  2002-08-06  3:23   ` Steve Harris
  0 siblings, 1 reply; 3+ messages in thread
From: Xavier Leroy @ 2002-08-05  9:40 UTC (permalink / raw)
  To: Steve Harris; +Cc: caml-list

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] pipe communication with toplevel
  2002-08-05  9:40 ` Xavier Leroy
@ 2002-08-06  3:23   ` Steve Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Harris @ 2002-08-06  3:23 UTC (permalink / raw)
  To: caml-list

On Monday, August 5, 2002, at 04:40  AM, Xavier Leroy wrote:

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

Good shot,  setting TERM to "none" for the toplevel child process fixed 
the problem.
Before, TERM had been unset, which was leading to the crashes (not sure 
if that's normal
or an OS X related bug).
Thanks for the advice.
Steve

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-06  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04  5:09 [Caml-list] pipe communication with toplevel Steve Harris
2002-08-05  9:40 ` Xavier Leroy
2002-08-06  3:23   ` Steve Harris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).