summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/ctl.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-05-08 20:38:10 +0000
committerhunt <hunt>2007-05-08 20:38:10 +0000
commit83c5b5febc674ae0810e8dfde55af1d91a2b0b80 (patch)
tree21082fd490422bf6131401d0fa496ac70b3902e2 /runtime/staprun/ctl.c
parent28b44d3c0faedb2f8453570311f21ff255df46dd (diff)
downloadsystemtap-steved-83c5b5febc674ae0810e8dfde55af1d91a2b0b80.tar.gz
systemtap-steved-83c5b5febc674ae0810e8dfde55af1d91a2b0b80.tar.xz
systemtap-steved-83c5b5febc674ae0810e8dfde55af1d91a2b0b80.zip
2007-05-08 Martin Hunt <hunt@redhat.com>
Signal handler cleanup. * mainloop.c (fatal_handler): New. Cleanly handle unexpected fatal signals. (setup_main_signals): New. Set signals once mainloop is entered. (setup_signals): New. Block certain signals during initialization. Set handler for fatal signals. * relay.c (reader_thread): Use ppoll(). Terminate on SIGUSR2 after reading any remaining data. (close_relayfs): Remove sleep hack. Send SIGUSR2 to all threads. Runtime debug messages. * staprun.h: Change dbug() to accept a debuglevel and enable it. * *.c: Modify dbug() calls.
Diffstat (limited to 'runtime/staprun/ctl.c')
-rw-r--r--runtime/staprun/ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/staprun/ctl.c b/runtime/staprun/ctl.c
index 95337f59..2996174b 100644
--- a/runtime/staprun/ctl.c
+++ b/runtime/staprun/ctl.c
@@ -40,7 +40,7 @@ static void read_buffer_info(void)
if (ret != 2)
fprintf (stderr, "ERROR: couldn't read bufsize.\n");
- dbug("n_subbufs= %u, size=%u\n", n_subbufs, subbuf_size);
+ dbug(2, "n_subbufs= %u, size=%u\n", n_subbufs, subbuf_size);
close(fd);
return;
}
@@ -56,7 +56,7 @@ int init_ctl_channel(void)
else
sprintf (buf, "/proc/systemtap/%s/cmd", modname);
- dbug("Opening %s\n", buf);
+ dbug(2, "Opening %s\n", buf);
control_channel = open(buf, O_RDWR);
if (control_channel < 0) {
if (attach_mod)