> 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).
Not true. I can see the OP's point - in an LD_PRELOAD setup, it is possible to override puts() with a version that depends on its environment; and by traversing with a local variable instead of environ, you then control whether puts is affected by the current traversal. Why you would want to use LD_PRELOAD to do something that fragile is a different matter, but the code as is definitely makes system calls with a changed environment, whereas the proposed patch would avoid that. -- Eric Blake _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
