On Mon, 19 Feb 2007, Harvey Eneman wrote:

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 "extern" declaration of environ doesn't have the effect you imagine; each process can modify only its own environment (and by extension the environment specified in execve(2) passed to children which it forks).

As env exits immediately, I'm having difficulty seeing what problems you're encountering.

The difficulty occurs when a LD_PRELOAD shared object uses glib functions that rely in the stability of environ.

No function is called before exit(EXIT_SUCCESS).


Cheers,
Phil


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to