gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Isatty Error (x: ✘3.23.1 ??)


From: Fred Wright
Subject: Re: Isatty Error (x: ✘3.23.1 ??)
Date: Tue, 14 Sep 2021 12:59:56 -0700 (PDT)
User-agent: Alpine 2.23 (OSX 453 2020-06-18)


On Mon, 13 Sep 2021, Gary E. Miller wrote:
On Mon, 13 Sep 2021 17:46:44 -0700 (PDT)
Fred Wright <fw@fwright.net> wrote:

It looks like it's being called after the device is closed.  Log
attached. Offending message at line 54.

Almost:

gpsd:INFO: closing GPS=udp://127.0.0.1:64963 (8)
gpsd:ERROR: SER: gpsd_serial_isatty(8) failed: Device not configured(6)
gpsd:IO: SER: gpsd_close(udp://127.0.0.1:64963), close(8)

The UDP socket is clearly not a tty.  Your isatty() is correctly
returning 0, but then setting errno = 6 (Device not configured).  But
that is not a POSIX legal errno from isatty().

And that is not even the proper POSIX.1-2001 description for errno = 6.
It should be:

   6  ENXIO    /* No such device or address */

Easy fix.  Pushed to git head.

What OS?  So I can notate why the non-POSIX code.

OSX 10.9.

Most uses of isatty() only care whether it's an open tty device or not, with errno being a don't care.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]