|
Message-ID: <CAL3m8eAp71GzVg_1Y8ypHkzyC1EQB=rqi2nD1VBYja0T2Xt+Wg@mail.gmail.com> Date: Mon, 9 Feb 2015 13:05:07 -0500 From: M Farkas-Dyck <strake888@...il.com> To: musl@...ts.openwall.com Subject: Re: Re: [PATCH] linedit, deluser: use POSIX getpwent instead of getpwent_r On 07/02/2015, Rich Felker <dalias@...c.org> wrote: > On Sat, Feb 07, 2015 at 03:14:10PM +0100, Denys Vlasenko wrote: >> On Sat, Feb 7, 2015 at 2:32 AM, Rich Felker <dalias@...c.org> wrote: >> >> > the _r functions are for thread-safe >> >> > versions of their corresponding legacy functions, but getpwent_r has >> >> > inherent global state -- the iterator. Whoever made it just wasn't >> >> > thinking. To make a correct interface like this the caller would >> >> > need >> >> > to have an iterator object to pass to the function, but I can't see >> >> > much merit in inventing a new interface for this. buf may contain arbitrary data, yes? If so we could store the iterator there.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.