]> sourceware.org Git - systemtap.git/commitdiff
runtime: let staprun -d identify itself differently in task->comm
authorFrank Ch. Eigler <fche@elastic.org>
Mon, 13 Dec 2010 18:39:06 +0000 (13:39 -0500)
committerFrank Ch. Eigler <fche@elastic.org>
Wed, 15 Dec 2010 20:14:46 +0000 (15:14 -0500)
staprun.c (remove_module): Use prctl() to set task name to "staprun-d".

runtime/staprun/staprun.c

index bfdb591154ea98bfd6bebea7030315b8e71004c2..93de54286f1e81f52bfddde3db06b2f775600218 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/uio.h>
 #include <glob.h>
 #include <time.h>
-
+#include <sys/prctl.h>
 
 /* used in dbug, _err and _perr */
 char *__name__ = "staprun";
@@ -175,6 +175,9 @@ static int remove_module(const char *name, int verb)
        int ret;
        dbug(2, "%s\n", name);
 
+        /* Make self easier to identify in vmcrash images */
+        prctl (PR_SET_NAME, "staprun-d");
+
         (void) verb; /* XXX: ignore */
 
        if (strcmp(name, "*") == 0) {
This page took 0.028755 seconds and 5 git commands to generate.