Re: Remove file descriptors completely from srfi-170?
Marc Nieper-Wißkirchen 10 Sep 2020 19:28 UTC
Am Do., 10. Sept. 2020 um 21:23 Uhr schrieb <xxxxxx@ancell-ent.com>:
>
> Responding to the one question I can immediately answer:
>
> > From: "Marc Nieper-Wißkirchen" <xxxxxx@nieper-wisskirchen.de>
> > Date: Thursday, September 10, 2020 2:07 PM
> >
> > [...]
> >
> > PS How can I find out whether (current-input-port) or
> > (current-output-port) is a terminal?
>
> Ummm, and copying from a REPL just to be sure:
>
> > (terminal? (port-internal-fd (current-input-port)))
> #t
>
> port-internal-fd returns a FDO. terminal? can accept a FDO.
But if the Scheme implementation does not export any FDOs,
port-internal-fd won't help. I may have missed it earlier, but why
doesn't terminal? also work on a port?