commit | bd4125c6bcd20e8f014b682b31d6fc5d0fef3ed0 | [log] [tgz] |
---|---|---|
author | Wichert Akkerman <wichert@deephackmode.org> | Tue Jun 27 17:28:06 2000 +0000 |
committer | Wichert Akkerman <wichert@deephackmode.org> | Tue Jun 27 17:28:06 2000 +0000 |
tree | e556871ce66a3f4ec22c8ca24921de2e77a9ad9e | |
parent | 5ae21ead9f83597452f9a0517e8a51fa4823f921 [diff] [blame] |
Close outf fd when forking
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;