Ralph wrote:

> > > I think the test is mhparam(1)'s checking for a TTY on FDs 0, 1, and
> > > 2.  OpenBSD's man page says $SHELL is used.  Perhaps the test can
> > > make use of this.
> > >
> > >     $ cat >cmd
> > >     #! /bin/sh
> > >
> > >     mhparam path
> > >     $ chmod +x cmd
> > >     $ SHELL=`pwd`/cmd script

I went with this approach.  And I had to add a run-time check that
script(1) does what we want, by making the program that it runs
look like it's connected to a terminal.  I don't see any obvious
pattern for that:  FreeBSD 10 and Fedora 24 do, Fedora 18 on ARM7
and Ubuntu 14 don't.  Anyway, the test should be robust now.

Thanks, Ralph.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to