Subject: Re: getpw*_r standards
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Love <lha@stacken.kth.se>
List: current-users
Date: 04/11/2005 13:28:56
--=-=-=


jnemeth@victoria.tc.ca (John Nemeth) writes:

> but I believe the *_r functions were invented to make things work in a
> threaded world.

_r functions are also very useful for libraries so they don't clobber
application's variables.


	foo = getfoobyname("foo");
	libcall();
	printf("%s", foo->f_name);

might not do what you expect if the libcall also calls getfoobyname.

Love


--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (NetBSD)

iQEVAwUAQlpfeto1gLFKFEjAAQKYmAf+NQMSkQBzOJdGcGNhqFZgUOHOe+f2DMOy
aGHZklLTWPUhPvykhLBlObXy+/mW5ZxZWOvmfCtsKkb5vLMPr3ENcfM9uoRNv1rF
+1YiktUUKkpxJxo32lba5KHGGWpakKl9FNMsJjV3qnmQ7PE8teJD9NmigsUmiamT
Uo8bDINxM719ogiXBXWzDndyjWzYrqur8YruQwPrbmrNfCeb7HOIzDbs801b4Gc9
2q6vuZfs+GxODHP5u+C1PTLHDMEE+J/sUjrAm2YUOJSJvuqYBYySTS92VuDTgv4x
5BqNzOWnkPsgZcrCFZ9HGH37Etk7tO2tBtSYJnPNSL0YFU736XyUtw==
=Qevk
-----END PGP SIGNATURE-----
--=-=-=--