gpsd-dev
[Top][All Lists]
Advanced

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

Re: gpxlogger (x: ✘3.23 is near. Please test!)


From: Gary E. Miller
Subject: Re: gpxlogger (x: ✘3.23 is near. Please test!)
Date: Sun, 1 Aug 2021 14:21:46 -0700

Yo Fred!

On Sat, 31 Jul 2021 21:37:28 -0700 (PDT)
Fred Wright <fw@fwright.net> wrote:

> >> Previously, quit_handler() was doing things which were technically
> >> illegal but worked, including a gps_close() which terminated the
> >> gps_mainloop(). The new code seems to assume that gps_mainloop()
> >> returns frequently, which it doesn't, since it's designed to
> >> iterate internally, and the only reason for the outer loop was for
> >> reconnecting.  Adding the sig_flag check there doesn't help,
> >> because it's never reached.  
> >
> > Agreed.  So I put the exit in the mainloo callback.  Then added an
> > atexit() to send the gpx footer.  
> 
> That works in the common case, but not in the case where the daemon
> isn't sending anything.  I don't see any way to fix that without some
> change to the API, putting back the ugly gps_close() in the signal
> handler, or directly exiting from the signal handler (which is what
> it did way back when).

It should fall out the mainloop() on timeout from the daemon.  Did you
test that case?

It does not matter how it exits, the atexit() will handle the footer and
the gps_close() on exit.

> > Needs more work, but after release.  
> 
> Fixing it properly can wait, but I verified that the 3.22 version
> does handle this correctly, so it's indeed a regression as is.

No, 3.22 has several CWE, which I would hate to get escalated to a CVE.

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: pgp4KBCSAHIty.pgp
Description: OpenPGP digital signature


reply via email to

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