I've experienced an issue with the env implementation due to its
modification of the environ external variable:
/* If no program is specified, print the environment and exit. */
if (argc <= optind)
{
while (*environ)
puts (*environ++);
exit (EXIT_SUCCESS);
}
The difficulty occurs when a LD_PRELOAD shared object uses glib
functions that rely in the stability of environ.
Is there a rational reason why a local variable is not being used? For
example:
/* If no program is specified, print the environment and exit. */
if (argc <= optind)
{
char **e = environ;
while (*e)
puts (*e++);
exit (EXIT_SUCCESS);
}
Thanks,
Harv
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils