This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Proposal: check and read /etc/{passwd,group} less frequently.




> -----Original Message-----
> From: Kazuhiro Fujieda [mailto:fujieda@jaist.ac.jp]
> Sent: Friday, September 14, 2001 4:49 PM
> To: cygwin-developers@cygwin.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]