"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: tog: ensure stdin is a tty
To:
Stefan Sperling <stsp@stsp.name>
Cc:
Mark Jamsek <mark@jamsek.com>, Game of Trees <gameoftrees@openbsd.org>
Date:
Sat, 03 Sep 2022 16:55:57 +0200

Download raw body.

Thread
On 2022/09/03 15:37:31 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> On Sat, Sep 03, 2022 at 11:24:47PM +1000, Mark Jamsek wrote:
> > This was discussed a while back on IRC to handle such things like:
> > 
> >   $ tog < /dev/null
> > 
> > ok?
> 
> Should 'return 1' or exit(1) on error, not return GOT_ERR_IO.

given the place where that check is, I'd go with an

	errx(1, "stardand input is not a tty");

otherwise ok for me!


Thanks,