blob: 1659d7af90cdfc29b99c9158ec09f486745731bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
--- coregrind/vg_main.c 2004-04-10 08:32:49 UTC (rev 327)
+++ coregrind/vg_main.c 2004-04-19 09:10:49 UTC (rev 328)
@@ -1135,9 +1135,10 @@
/* Move logfile_fd into the safe range, so it doesn't conflict with any app fds */
eventually_logfile_fd = VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_DUPFD, VG_(max_fd)+1);
- if (eventually_logfile_fd < 0)
+ if (eventually_logfile_fd < 0) {
+ VG_(clo_logfile_fd) = 2;
VG_(message)(Vg_UserMsg, "valgrind: failed to move logfile fd into safe range");
- else {
+ } else {
VG_(clo_logfile_fd) = eventually_logfile_fd;
VG_(fcntl)(VG_(clo_logfile_fd), VKI_F_SETFD, VKI_FD_CLOEXEC);
}
|