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: Gary E. Miller
Subject: Re: Isatty Error (x: ✘3.23.1 ??)
Date: Mon, 13 Sep 2021 19:14:44 -0700

Yo Fred!

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.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpL2orVekuzC.pgp
Description: OpenPGP digital signature


reply via email to

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