This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] strace: Make sure strace timer isn't copied to child process
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 6 Jul 2016 17:13:09 -0000
- Subject: [newlib-cygwin] strace: Make sure strace timer isn't copied to child process
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8cff1569fc5816a8b38ad47834cebd109dad1cce
commit 8cff1569fc5816a8b38ad47834cebd109dad1cce
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Jul 6 19:12:59 2016 +0200
strace: Make sure strace timer isn't copied to child process
At fork time the .data and .bss segments of the Cygwin DLL are copied
over to the child process. This also copies the strace timer since
it's in the .bss segment so far. Fix that by moving the strace timer
out into the .data_cygwin_nocopy segment.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/strace.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index a05a4e0..1e7ab04 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -82,7 +82,7 @@ strace::dll_info ()
int
strace::microseconds ()
{
- static hires_ns now;
+ static hires_ns now NO_COPY;
return (int) now.usecs ();
}