Module: wine Branch: stable Commit: 90d0dcf9090ccbbc1c9a9dc14ff6a323da99ed25 URL: http://source.winehq.org/git/wine.git/?a=commit;h=90d0dcf9090ccbbc1c9a9dc14f...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Sep 30 17:05:35 2010 +0200
ntdll: Add a workaround for Ubuntu's stupid ptrace breakage. (cherry picked from commit 9227eb2c9d6f0cecbabcb54cc25b5691f544b0f4)
---
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 ee066e9..79e1f8e 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 @@ -1011,6 +1014,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 }