summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-12-03 15:33:17 -0800
committerRoland McGrath <roland@redhat.com>2008-12-03 18:15:36 -0800
commitaad1a79ccc20268ba399f0e025f203e968978350 (patch)
treee8c778154f6e702378056019d6eecca470062041 /buildrun.cxx
parentc1f7a8464fa9054e6ee06e05451f555b5504dd71 (diff)
downloadsystemtap-steved-aad1a79ccc20268ba399f0e025f203e968978350.tar.gz
systemtap-steved-aad1a79ccc20268ba399f0e025f203e968978350.tar.xz
systemtap-steved-aad1a79ccc20268ba399f0e025f203e968978350.zip
PR7063: honor SYSTEMTAP_STAPRUN and SYSTEMTAP_STAPIO environment variables
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index c6f465c5..9078a035 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -1,5 +1,5 @@
// build/run probes
-// Copyright (C) 2005-2007 Red Hat Inc.
+// Copyright (C) 2005-2008 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -268,11 +268,9 @@ run_pass (systemtap_session& s)
{
int rc = 0;
- struct passwd *pw = getpwuid(getuid());
- string username = string(pw->pw_name);
-
// for now, just spawn staprun
- string staprun_cmd = string(BINDIR) + "/staprun "
+ string staprun_cmd = string(getenv("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun")
+ + " "
+ (s.verbose>1 ? "-v " : "")
+ (s.verbose>2 ? "-v " : "")
+ (s.output_file.empty() ? "" : "-o " + s.output_file + " ");