> < ^ Date: Sun, 25 May 1997 11:08:00 +0100 (MET)
> < ^ From: Frank Celler <frank.celler@math.rwth-aachen.de >
< ^ Subject: Re: quitting break loops

Dear Gustavo Fernandez Alcober,

you wrote:

This problem could be fixed if there were some way to tell Gap, when
opening a session, that break loops should be quitted automatically.
I suspect this cannot be done, since the behaviour of break loops is
probably implemented in the kernel, but there is no harm in asking!

such a possibility does indeed exist. GAP knows about two input
files, namely "*stdin*" and "*errin*". If GAP is not in a break loop
it will read commands from "*stdin*", if it is in a break loop GAP
uses "*errin*". Under UNIX the files "*stdin*" and "*errin*" are
selected as follows:

"*stdin*": is the normal standard input, which might be a terminal or

"*errin*": if standard error is connected to a tty and the standard
input and standard error are connected to the same tty, standard
input will be used; if standard input is not a tty or different from
standard error, GAP tries to open standard error for input.
However, if this fails GAP will not associate a file or tty with

The reason for doing so, is that if you are working interactively with
GAP you want "*stdin*" and "*errin*" to be the same and if you are
using GAP in a batch mode you do not want the break loop to read from
your file. However, there are circumstances when you are batching a
file and want to be able to enter the breakloop to check its progress.
On the other hand, when standard error is redirected to a file you
don't care what is happening in a break loop, and that is the
situation you are in.

Under UNIX (sh) you could simply redirect the standard error to
/dev/null or a file, this will cause GAP not to open "*errin*" and
consequently never to enter a break loop.


sh> gap -q -b < programs.tst 2> /tmp/err > /dev/null

"/tmp/err" will be empty if and only if no error occurred.

Hope that helps with your problem

> < [top]