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
|
||||
#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
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue