[PATCH] set_ptracer_any: add a little documentation

Mike Frysinger vapier at gentoo.org
Mon Aug 11 05:31:09 UTC 2014


This way I don't have to keep reading up on these options and wondering
why the code isn't aborting when the call fails.

* tests/set_ptracer_any.c (main): Note prctl failures are ok.
---
 tests/set_ptracer_any.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/set_ptracer_any.c b/tests/set_ptracer_any.c
index 7254a07..dbd5337 100644
--- a/tests/set_ptracer_any.c
+++ b/tests/set_ptracer_any.c
@@ -12,6 +12,8 @@ int main(int argc, char **argv)
 	if (argc < 2)
 		return 99;
 #if defined HAVE_PRCTL && defined PR_SET_PTRACER && defined PR_SET_PTRACER_ANY
+	/* Turn off restrictions on tracing if applicable.  If the options
+	 * aren't available on this system, that's OK too.  */
 	(void) prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);
 #endif
 	if (write(1, "\n", 1) != 1) {
-- 
2.0.0





More information about the Strace-devel mailing list