Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: Proposal: check and read /etc/{passwd,group} less frequently. X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Date: Fri, 14 Sep 2001 16:40:43 +1000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Proposal: check and read /etc/{passwd,group} less frequently. Thread-Index: AcE8551GXV53lN5jQx+ZgPsum87Q1gAAAr4g From: "Robert Collins" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA26072 > -----Original Message----- > From: Kazuhiro Fujieda [mailto:fujieda AT jaist DOT ac DOT jp] > Sent: Friday, September 14, 2001 4:49 PM > To: cygwin-developers AT cygwin DOT com > Subject: Proposal: check and read /etc/{passwd,group} less frequently. > > > I feel that there is no need to check and read > /etc/{passwd,group} on every getpw* and getgw* functions. > > Is it enough frequent that the check is held only in > internal_getlogin? How often is internal_getlogin called relative to get(p|g)w*? > If so, read_etc_{passwd,group} don't need to support multi threads > and can be more simple. I don't see how they would no longer need thread protection. internal_getlogin could be updating the cache while a user thread calls getpwuid. As far as the user is concerned, they may have a mutex or some other mechanism no to step on their own data, instead of using getpwuid_r, but we cannot afford to step on our internal data regardless. Ro