]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When the client tries to __NR_close() our logfile, claim the close
authorJulian Seward <jseward@acm.org>
Fri, 13 Sep 2002 15:38:32 +0000 (15:38 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 13 Sep 2002 15:38:32 +0000 (15:38 +0000)
succeeded, which is a lie since we just ignore it -- otherwise the
log disappears at that point.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_1_0_BRANCH@949

vg_syscall_mem.c

index f7f245a7173f90d0c465e9668daa63c6d11ed34a..75badc1377c7162cdce7349f68056737ed5248ff 100644 (file)
@@ -1095,6 +1095,8 @@ void VG_(perform_assumed_nonblocking_syscall) ( ThreadId tid )
             VG_(message)(Vg_UserMsg, 
               "   Use --logfile-fd=<number> to select an "
               "alternative logfile fd." );
+            /* Pretend the close succeeded, regardless.  (0 == success) */
+            SET_EAX(tid, 0);
          } else {
             KERNEL_DO_SYSCALL(tid,res);
          }