Although there's the case when it's handed a port who's file descriptor is not valid, which would likely indicate something is terribly wrong, or the port was closed.  I think we should raise an error in the former case, which also sweeps in the latter.

Otherwise, I'll have my Chibi Scheme implementation only raise an error if it's not handed a port.

- Harold

----- Original message -----
From: John Cowan <xxxxxx@ccil.org>
Date: Saturday, August 10, 2019 4:21 PM

I'd say that's a clear-cut case when we should not raise an exception, especially since it's only a MAY.

On Sat, Aug 10, 2019 at 5:11 PM <xxxxxx@ancell-ent.com> wrote:

Per POSIX, isatty is allowed to set errno to ENOTTY when handed a file descriptor to something that's not a terminal device, like one opened to a regular file.  Should we signal an error, or just return #f in that case?  Ditto if the port handed to tty? does not have a file descriptor, like a string port.

- Harold