proper semantics for returning a character string?

Robert P. J. Day rpjday at mindspring.com
Fri Apr 21 14:18:04 UTC 2006


On Fri, 21 Apr 2006, Rich Felker wrote:

> On Thu, Apr 20, 2006 at 03:29:06PM -0400, Robert P. J. Day wrote:
> > i'll just assume that's a typo.  the issue that was raised
> > earlier, though, was that if you call that routine repeatedly,
> > even for the same UID, you're going to slowly consume memory as
> > every call to getpwuid() allocates space for a new "struct
> > passwd", right?  and that
>
> Absolutely not. It returns a static buffer.

yes, i think we finally established that, despite the man page being a
bit ambiguous about it.

rday



More information about the busybox mailing list