ntdll: Add a workaround for Ubuntu's stupid ptrace breakage.
This commit is contained in:
parent
dec7effac0
commit
9227eb2c9d
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue