]> Sergey Matveev's repositories - nnn.git/commitdiff
Confirm we are in a terminal
authorlostd <lostd@2f30.org>
Thu, 12 Mar 2015 12:57:34 +0000 (14:57 +0200)
committerlostd <lostd@2f30.org>
Thu, 12 Mar 2015 12:57:34 +0000 (14:57 +0200)
noice.c

diff --git a/noice.c b/noice.c
index e56a5f9ae785be078b673b1041958d562804bed2..600e57020763ecc2c0784eb7b9ac3ec37beb7be8 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -835,6 +835,10 @@ main(int argc, char *argv[])
        char cwd[PATH_MAX], *ipath;
        char *ifilter;
 
+       /* Confirm we are in a terminal */
+       if (!isatty(STDIN_FILENO))
+               printerr(1, "isatty");
+
        if (getuid() == 0)
                ifilter = ".";
        else