changeset 368:ed1c7f2d81df

fetch_weather: Close STDOUT filehandle before reopening it, to make sure we are actually writing data to the intended output.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 18 Dec 2015 10:09:32 +0200
parents 1ca8ae195077
children 86adad909681
files fetch_weather.pl
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/fetch_weather.pl	Fri Dec 18 10:07:35 2015 +0200
+++ b/fetch_weather.pl	Fri Dec 18 10:09:32 2015 +0200
@@ -504,6 +504,7 @@
 ###
 if (opt_chk_valid("outfile", 1))
 {
+  close(STDOUT);
   open(STDOUT, '>', opt_get("outfile")) or die("Could not open output file '".opt_get("outfile")."'.\n");
 }