Close outf fd when forking
diff --git a/ChangeLog b/ChangeLog
index 62d5b75..07220ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-23 Wichert Akkerman <wakkerma@debian.org>
+
+ * strace.c: close outf before we exec a child process
+
2000-04-26 Wichert Akkerman <wakkerma@debian.org>
* defs.h: balance #if/#endif again
diff --git a/strace.c b/strace.c
index 3c178ce..40063da 100644
--- a/strace.c
+++ b/strace.c
@@ -419,6 +419,9 @@
#endif /* MIPS */
pause();
#else /* !SVR4 */
+ if (outf!=stderr)
+ close(outf);
+
if (ptrace(PTRACE_TRACEME, 0, (char *) 1, 0) < 0) {
perror("strace: ptrace(PTRACE_TRACEME, ...)");
return -1;