Hi, Eric Blake <[email protected]> writes:
> On 05/06/2010 09:13 AM, Ludovic Courtès wrote: >>> Even if it is also available as a shell builtin, that does not >>> alleviate the requirement to also have it available on $PATH. >> >> echo(1) *is* available in $PATH in the build environment, just like all >> of Coreutils. >> >> What would you think of ‘--with-echo’? > > Why is xargs blindly calling /bin/echo? Wouldn't it just be simpler to > change xargs.c' definition of default_cmd to be "echo" instead of > "/bin/echo" and using execvp instead of execve? In a compliant > environment, you are guaranteed that echo(1) is on PATH, and calling the > wrong echo because of a non-compliant environment is not really xargs' > concern. In other words, instead of making it more complex by adding > configure --with-echo, I propose making it simpler by dropping the > hard-coding in the first place. It makes sense to me. Whatever you do won’t prevent xargs(1) from calling whatever echo(1) the user wants to, anyway. Thanks, Ludo’.
