coreutils/coreutils-7.2-trueexecve.patch

31 lines
879 B
Diff

diff -urNp coreutils-7.2-orig/src/true.c coreutils-7.2/src/true.c
--- coreutils-7.2-orig/src/true.c 2009-03-29 19:43:41.000000000 +0200
+++ coreutils-7.2/src/true.c 2010-01-12 15:52:44.000000000 +0100
@@ -54,18 +54,19 @@ Usage: %s [ignored command line argument
int
main (int argc, char **argv)
{
- initialize_main (&argc, &argv);
- set_program_name (argv[0]);
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
-
- atexit (close_stdout);
/* Recognize --help or --version only if it's the only command-line
argument. */
if (argc == 2)
{
+ initialize_main (&argc, &argv);
+ set_program_name (argv[0]);
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
+ atexit (close_stdout);
+
if (STREQ (argv[1], "--help"))
usage (EXIT_STATUS);