[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: openlog
- From: "Gary V. Vaughan" <gary@...>
- Date: Wed, 14 Aug 2013 11:02:59 +0700
Hi Matthew,
On Aug 13, 2013, at 8:29 PM, Matthew Wild <mwild1@gmail.com> wrote:
> On 13 August 2013 14:13, dcharno <dcharno@comcast.net> wrote:
>> The GNU libc manual says the pointer to ident in openlog is retained and the memory shouldn't be freed. I noticed the openlog binding in luaposix doesn't do anything special to make sure the string isn't garbage collected and neither do most FFI bindings for syslog. I haven't experienced a problem (yet) so maybe it isn't an issue. How do people handle this in their bindings.
>
> This is one of the reasons we're not using luaposix in Prosody yet. We
> use this code, which works for us so far:
> http://hg.prosody.im/trunk/file/e8c79796ead9/util-src/pposix.c#l163
>
> It would be nice to handle this well in luaposix.
I don't personally use all the calls available in luaposix, but I am very happy to apply patches to improve the parts I don't use myself… or even write patches for those parts if someone sends me a test (any smallish self contained Lua snippet is perfect!) that will verify my implementation is correct :)
Cheers,
--
Gary V. Vaughan (gary AT vaughan DOT pe)
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail