]> granicus.if.org Git - strace/commitdiff
set_ptracer_any: add a little documentation
authorMike Frysinger <vapier@gentoo.org>
Mon, 11 Aug 2014 05:31:09 +0000 (01:31 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 11 Aug 2014 17:19:17 +0000 (17:19 +0000)
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

index 7254a07fb7879acb15e642de7ebd5c91347fc0f6..dbd5337256420fa9562b6db97f1b8c673fb59f9d 100644 (file)
@@ -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) {