Alexandre Julliard : ntdll: Add a workaround for Ubuntu' s stupid ptrace breakage.

Alexandre Julliard julliard at winehq.org
Thu Sep 30 11:23:36 CDT 2010


Module: wine
Branch: master
Commit: 9227eb2c9d6f0cecbabcb54cc25b5691f544b0f4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9227eb2c9d6f0cecbabcb54cc25b5691f544b0f4

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Sep 30 17:05:35 2010 +0200

ntdll: Add a workaround for Ubuntu's stupid ptrace breakage.

---

 dlls/ntdll/server.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 8da00ca..df46935 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -45,6 +45,9 @@
 #ifdef HAVE_SYS_MMAN_H
 #include <sys/mman.h>
 #endif
+#ifdef HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
@@ -1013,6 +1016,10 @@ void server_init_process(void)
 #ifdef __APPLE__
     send_server_task_port();
 #endif
+#if defined(__linux__) && defined(HAVE_PRCTL)
+    /* work around Ubuntu's ptrace breakage */
+    if (server_pid != -1) prctl( 0x59616d61 /* PR_SET_PTRACER */, server_pid );
+#endif
 }
 
 




More information about the wine-cvs mailing list