summary refs log tree commit diff
path: root/redo.c
diff options
context:
space:
mode:
Diffstat (limited to 'redo.c')
-rw-r--r--redo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/redo.c b/redo.c
index 446b810..f9fa518 100644
--- a/redo.c
+++ b/redo.c
@@ -621,7 +621,8 @@ djb-style default.o.do:
 			basename[i--] = 0;
 		}
 
-		close(old_dep_fd);
+		if (old_dep_fd > 0)
+			close(old_dep_fd);
 		setenvfd("REDO_DEP_FD", dep_fd);
 		setenvfd("REDO_LEVEL", level + 1);
 		if (sflag > 0)