proper semantics for returning a character string?

Rich Felker dalias at aerifal.cx
Fri Apr 21 14:17:23 UTC 2006


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.

Rich




More information about the busybox mailing list