gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] PPS and privilege-dropping


From: Gary E. Miller
Subject: Re: [gpsd-dev] PPS and privilege-dropping
Date: Fri, 18 Oct 2013 10:45:36 -0700

Yo Eric!

On Fri, 18 Oct 2013 05:32:19 -0400
"Eric S. Raymond" <address@hidden> wrote:

> Gary E. Miller <address@hidden>:
> > To answer my own question, the answer was in a different email.  As
> > I feared the code returns misleading data in a non-thread safe
> > manner.  It is broken and needs to be fixed.
> 
> How is the data "misleading"? And how would you fix it?

It is misleading because it is using the wrong times.  That is
an easy fix and I'll get to that tonight or Saturday.

The harder problem is it is not thread safe.  You can not safely emit
JSON from the pps thread.  What I see is the JSON PPS randomly in the
middle of the other JSON output.  Thus corrupting both.  My first
thought is to put the PPS data in the session structure, then flag the
main thread to output it.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

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