xargs: make -I imply -r
Make -I imply -r (GNU findutils seems to do the same). Fixes the following bug: $ echo -n | xargs -I% echo % Segmentation fault Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
f98705a00c
commit
6d777b75ed
@ -577,6 +577,9 @@ int xargs_main(int argc, char **argv)
|
||||
G.argv = argv;
|
||||
argc = 0;
|
||||
read_args = process_stdin_with_replace;
|
||||
/* Make -I imply -r. GNU findutils seems to do the same: */
|
||||
/* (otherwise "echo -n | xargs -I% echo %" would SEGV) */
|
||||
opt |= OPT_NO_EMPTY;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user