fts: do not fail on a submount during traversal
[pspp] / lib / pipe-filter-ii.c
index 8281ad0119d6e82d4c80359f19c7405289fb5d44..cbdaf94f6eaf52fe47c02957ceae4aee39509053 100644 (file)
@@ -289,9 +289,9 @@ pipe_filter_ii_execute (const char *progname,
       int fcntl_flags;
 
       if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0
-         || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) < 0
+         || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1
          || (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0
-         || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) < 0)
+         || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1)
        {
          if (exit_on_error)
            error (EXIT_FAILURE, errno,