X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sat, 5 Dec 2009 10:48:55 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [1.7] getgroups regression? Message-ID: <20091205094855.GQ8059@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Dec 4 22:48, Eric Blake wrote: > Meanwhile, is sorting and/or pruning duplicate getgroups results something that > cygwin should consider doing? POSIX is explicit that the result is a > mathematical set, and that two processes can have the same set membership but > different orders based on the sequence of events that created those two > processes. But will Linux ever list a duplicate, even if duplicates appear > in /etc/group? Probably not. I assume the job of getgroups() is much easier on Linux. It just has to list the gids in the group list. Cygwin fetches the /etc/group file and verifies for each entry if its SID is in the process token. Avoiding dups requires YA loop in the loop, I don't think it's actually worth the effort. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple