Created
July 30, 2018 17:47
-
-
Save andrwng/bd22824797ded401a44a13f69f39dc1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/kudu/util/subprocess.cc b/src/kudu/util/subprocess.cc | |
index d68cb7f656f78847430887d4dfa0676d8392ee1a..8d3ef7dc752799785effbfd990a9b4700fcfd546 100644 | |
--- a/src/kudu/util/subprocess.cc | |
+++ b/src/kudu/util/subprocess.cc | |
@@ -376,6 +376,10 @@ Status Subprocess::Start() { | |
// TODO: prctl(PR_SET_PDEATHSIG) is Linux-specific, look into portable ways | |
// to prevent orphans when parent is killed. | |
prctl(PR_SET_PDEATHSIG, SIGKILL); | |
+ | |
+ // Allow the child process to be ptraced by any thread. | |
+ // This is synonymous with `prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY)`. | |
+ prctl(0x59616d61, ((unsigned long)-1)); | |
#endif | |
// stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment