summaryrefslogtreecommitdiff
path: root/src/ln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ln.c')
-rw-r--r--src/ln.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ln.c b/src/ln.c
index 741fe277f..e89a38c1b 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -372,7 +372,6 @@ the VERSION_CONTROL environment variable. Here are the values:\n\
simple, never always make simple backups\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
- close_stdout ();
}
exit (status);
}
@@ -396,6 +395,8 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
/* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
we'll actually use backup_suffix_string. */
backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
@@ -560,7 +561,5 @@ main (int argc, char **argv)
errors = do_link (source, new_dest);
}
- if (verbose)
- close_stdout ();
exit (errors != 0);
}