Don't close stdin when loopfiles reads "-".
diff --git a/lib/lib.c b/lib/lib.c
index 3f4819f..09264c9 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -570,7 +570,7 @@
       continue;
     }
     function(fd, *argv);
-    if (flags & O_CLOEXEC) close(fd);
+    if ((flags & O_CLOEXEC) && fd) close(fd);
   } while (*++argv);
 }