[New-bugs-announce] [issue6529] get{pw, gr}{nam, [ug]id}() calls are not re-entrant

Danek Duvall report at bugs.python.org
Tue Jul 21 00:54:46 CEST 2009

New submission from Danek Duvall <duvall at comfychair.org>:

In tracking down

        6861990 getgrnam_r() str2group() function makes decisions based
on return value before it's set

(viewable on bugs.opensolaris.org), I noted that the pwd and grp modules
don't use the MT-safe interfaces to the password and group name service
tables.  The _r() interfaces have been around for a long time, are
standard, and should be used if at all possible.  That said, I can't
imagine it's terribly likely that people will go to the lengths
necessary to actually put multiple calls in flight at the same time in
CPython, but should it ever become easy to put this code into concurrent
threads, it'll likely fall over.

components: Library (Lib)
messages: 90743
nosy: dhduvall
severity: normal
status: open
title: get{pw,gr}{nam,[ug]id}() calls are not re-entrant
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list