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

This commit is contained in:
Alexandre Julliard 2010-09-30 17:05:35 +02:00
parent dec7effac0
commit 9227eb2c9d
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,9 @@
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#ifdef HAVE_SYS_PRCTL_H
# include <sys/prctl.h>
#endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
# include <sys/stat.h> # include <sys/stat.h>
#endif #endif
@ -1013,6 +1016,10 @@ void server_init_process(void)
#ifdef __APPLE__ #ifdef __APPLE__
send_server_task_port(); send_server_task_port();
#endif #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
} }