pcp
[Top] [All Lists]

Re: [pcp] Python code vs local: host connections

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: [pcp] Python code vs local: host connections
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed, 18 Sep 2013 10:03:23 -0400
Cc: Nathan Scott <nathans@xxxxxxxxxx>, pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20130917234342.GC31394@xxxxxxxxxx>
References: <100234653.22684536.1379397669579.JavaMail.root@xxxxxxxxxx> <503959600.22684715.1379397714223.JavaMail.root@xxxxxxxxxx> <y0m61tzr1vf.fsf@xxxxxxxx> <y0m7gefp6ch.fsf@xxxxxxxx> <1441116249.23522135.1379458886089.JavaMail.root@xxxxxxxxxx> <20130917234342.GC31394@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 09/17/2013 07:43 PM, Frank Ch. Eigler wrote:
Hi -

While the new implementation of pmGetContextHostName does a strdup,
it's not documented to do that.  [...]
Perhaps we could backtrack on that, and instead use a static char[...]
[...]
*nod* - sounds good to me.  (Dave?)
RFC: commit 52979b0 in pcpfans.git fche/dev drafts this proposal.

I'm confused. fche and I discussed this on IRC and (Nathan later approved) and that the slightly leaky solution was chosen because it is thread safe. What's the point of replacing one thread-unsafe solution (race) with another one (static buffer)? Is correctness not a higher priority?

Dave

<Prev in Thread] Current Thread [Next in Thread>