Stop command-logging from non-stdin sources. 8/head
authorJason S. Ninneman <jsn@mbar.us>
Thu, 25 May 2017 05:31:26 +0000 (22:31 -0700)
committerJason S. Ninneman <jsn@mbar.us>
Thu, 25 May 2017 05:31:26 +0000 (22:31 -0700)
misc.c

diff --git a/misc.c b/misc.c
index b6ca80e3094dd7373802b7014c6314e32e4819fc..4d0a89d482a59ba9d93d1ef5ca8fc44864f2a232 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -894,7 +894,7 @@ long I, VAL;
                if (logfp && OPENED == stdin)
                        fclose(logfp);
        } else {
-               if (logfp)
+               if (logfp && OPENED == stdin)
                        IGNORE(fputs(INLINE+1, logfp));
                else if (!isatty(0))
                        IGNORE(fputs(INLINE+1, stdout));