summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2006-09-26 21:41:37 +0000
committerdsmith <dsmith>2006-09-26 21:41:37 +0000
commita63a95dc1994d08176b63f0a133749b531f22b80 (patch)
treeb9ffa6793a0289097481df6931a74c5478eb0a38 /buildrun.cxx
parent3ae203b24203fc169e39f7b733f11038aafa80ef (diff)
downloadsystemtap-steved-a63a95dc1994d08176b63f0a133749b531f22b80.tar.gz
systemtap-steved-a63a95dc1994d08176b63f0a133749b531f22b80.tar.xz
systemtap-steved-a63a95dc1994d08176b63f0a133749b531f22b80.zip
2006-09-26 David Smith <dsmith@redhat.com>
* .cvsignore: Changed 'stpd' reference to 'staprun'. * INTERNALS: Ditto. * buildrun.cxx (run_pass): Ditto. * lket.5.in: Ditto. * stap.1.in: Ditto. * stapruncs.5.in: Ditto. * examples/small_demos/demo_script.txt: Ditto. * examples/small_demos/sys.stp: Ditto. * systemtap.spec.in: Created a new subpackage, "systemtap-runtime", that contains staprun. * Makefile.am: Renamed 'stpd' to 'staprun' and moved it to $(bindir). * Makefile.in: Regenerated from Makefile.am. * configure.ac: Incremented version number. * configure: Regenerated from configure.ac.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index 1c21d1c5..fe499e1e 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -125,31 +125,31 @@ run_pass (systemtap_session& s)
struct passwd *pw = getpwuid(getuid());
string username = string(pw->pw_name);
- // for now, just spawn stpd
- string stpd_cmd = string("sudo ")
- + string(PKGLIBDIR) + "/stpd "
+ // for now, just spawn staprun
+ string staprun_cmd = string("sudo ")
+ + string(BINDIR) + "/staprun "
+ (s.verbose>1 ? "" : "-q ")
+ "-u " + username + " "
+ (s.output_file.empty() ? "" : "-o " + s.output_file + " ");
- stpd_cmd += "-d " + stringify(getpid()) + " ";
+ staprun_cmd += "-d " + stringify(getpid()) + " ";
if (s.cmd != "")
- stpd_cmd += "-c \"" + s.cmd + "\" ";
+ staprun_cmd += "-c \"" + s.cmd + "\" ";
if (s.target_pid)
- stpd_cmd += "-t " + stringify(s.target_pid) + " ";
+ staprun_cmd += "-t " + stringify(s.target_pid) + " ";
if (s.buffer_size)
- stpd_cmd += "-b " + stringify(s.buffer_size) + " ";
+ staprun_cmd += "-b " + stringify(s.buffer_size) + " ";
- stpd_cmd += s.tmpdir + "/" + s.module_name + ".ko";
+ staprun_cmd += s.tmpdir + "/" + s.module_name + ".ko";
- if (s.verbose>1) clog << "Running " << stpd_cmd << endl;
+ if (s.verbose>1) clog << "Running " << staprun_cmd << endl;
signal (SIGHUP, SIG_IGN);
signal (SIGINT, SIG_IGN);
- rc = system (stpd_cmd.c_str ());
+ rc = system (staprun_cmd.c_str ());
return rc;
}