diff options
author | fche <fche> | 2005-12-08 23:49:23 +0000 |
---|---|---|
committer | fche <fche> | 2005-12-08 23:49:23 +0000 |
commit | 0c6296b282d40c4e39f0af6ddde0d6f74e477147 (patch) | |
tree | 2830a3731c452553a7af3d8e0a309f6ac37bdddf /runtime/stpd/stpd.c | |
parent | 99675700179e2a22adf8a9492b73864ff8755add (diff) | |
download | systemtap-steved-0c6296b282d40c4e39f0af6ddde0d6f74e477147.tar.gz systemtap-steved-0c6296b282d40c4e39f0af6ddde0d6f74e477147.tar.xz systemtap-steved-0c6296b282d40c4e39f0af6ddde0d6f74e477147.zip |
2005-12-08 Frank Ch. Eigler <fche@elastic.org>
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 <fche@elastic.org>
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.
Diffstat (limited to 'runtime/stpd/stpd.c')
-rw-r--r-- | runtime/stpd/stpd.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |