Stop command-logging from non-stdin sources.
authorJason S. Ninneman <jsn@mbar.us>
Thu, 25 May 2017 05:31:26 +0000 (22:31 -0700)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 23 Mar 2023 15:28:53 +0000 (11:28 -0400)
misc.c

diff --git a/misc.c b/misc.c
index 3243f1e50895c886efd30e25d329caa4f3e3d776..3bca47305d0c13fd8a39330aab154aa6f94e5a1d 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -892,7 +892,7 @@ long I, VAL;
                if (logfp)
                        fclose(logfp);
        } else {
-               if (logfp)
+               if (logfp && OPENED == stdin)
                        IGNORE(fputs(INLINE+1, logfp));
                else if (!isatty(0)) {
                        IGNORE(fputs("> ", stdout));