From 0c6296b282d40c4e39f0af6ddde0d6f74e477147 Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 8 Dec 2005 23:49:23 +0000 Subject: 2005-12-08 Frank Ch. Eigler PR 1937 * buildrun.cxx (run_pass): Pass new "-d PID" option to stpd. Set SIGHUP to SIG_IGN too. 2005-12-08 Frank Ch. Eigler PR 1937 * stpd.c (main): Support new "-d" option. (usage): Document it. * librelay.c (driver_poll): New function to react to death of driver process. (stp_main_loop): Call it if "-d PID" given. Treat SIGHUP like others. --- runtime/stpd/stpd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/stpd/stpd.c') diff --git a/runtime/stpd/stpd.c b/runtime/stpd/stpd.c index 9587d29f..c12ca096 100644 --- a/runtime/stpd/stpd.c +++ b/runtime/stpd/stpd.c @@ -37,6 +37,7 @@ int merge = 1; int verbose = 0; int enable_relayfs = 1; int target_pid = 0; +int driver_pid = 0; unsigned int buffer_size = 0; char *modname = NULL; char *modpath = NULL; @@ -66,6 +67,7 @@ static void usage(char *prog) fprintf(stderr, "-c cmd. Command \'cmd\' will be run and stpd will exit when it does.\n"); fprintf(stderr, " _stp_target will contain the pid for the command.\n"); fprintf(stderr, "-t pid. Sets _stp_target to pid.\n"); + fprintf(stderr, "-d pid. Pass the systemtap driver's pid.\n"); fprintf(stderr, "-b buffer size. The systemtap module will specify a buffer size.\n"); fprintf(stderr, "-o FILE. Send output to FILE.\n"); fprintf(stderr, " Setting one here will override that value. The value should be\n"); @@ -79,7 +81,7 @@ int main(int argc, char **argv) int c, status; pid_t pid; - while ((c = getopt(argc, argv, "mpqrb:n:t:c:vo:")) != EOF) + while ((c = getopt(argc, argv, "mpqrb:n:t:d:c:vo:")) != EOF) { switch (c) { case 'm': @@ -112,6 +114,9 @@ int main(int argc, char **argv) case 't': target_pid = atoi(optarg); break; + case 'd': + driver_pid = atoi(optarg); + break; case 'c': target_cmd = optarg; break; -- cgit