Sat Jan 23 14:24:43 2016 UTC ()
Explain what REDIRECT is for.


(christos)
diff -r1.45 -r1.46 src/usr.bin/m4/main.c

cvs diff -r1.45 -r1.46 src/usr.bin/m4/main.c (expand / switch to context diff)
--- src/usr.bin/m4/main.c 2016/01/16 21:12:27 1.45
+++ src/usr.bin/m4/main.c 2016/01/23 14:24:43 1.46
@@ -1,5 +1,5 @@
 /*	$OpenBSD: main.c,v 1.77 2009/10/14 17:19:47 sthen Exp $	*/
-/*	$NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
 #include "nbtool_config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.45 2016/01/16 21:12:27 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.46 2016/01/23 14:24:43 christos Exp $");
 #include <assert.h>
 #include <signal.h>
 #include <getopt.h>
@@ -325,6 +325,11 @@
 		}
 
 #ifdef REDIRECT
+	/*
+	 * This is meant only for debugging; it makes all output
+	 * go to a known file, even if the command line options
+	 * send it elsewhere. It should not be turned of in production code.
+	 */
 	if (freopen("/tmp/m4", "w+", stderr) == NULL)
 		err(EXIT_FAILURE, "Can't redirect errors to `%s'",
 		    "/tmp/m4");