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: Eric S. Raymond
Subject: Re: [gpsd-dev] PPS and privilege-dropping
Date: Fri, 18 Oct 2013 14:48:12 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Gary E. Miller <address@hidden>:
> It is misleading because it is using the wrong times.  That is
> an easy fix and I'll get to that tonight or Saturday.

Thanks.
 
> 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.

Aaaaaarrrrggh.  So *that's* why I had a mutex lock in notify_watchers()!

I  got this right the first time, then forgot why part of the machinery was
there and removed it.  That'll teach me to write a better comment next time.

I'll fix.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

Attachment: signature.asc
Description: Digital signature


reply via email to

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