diff options
author | fche <fche> | 2005-10-18 17:59:17 +0000 |
---|---|---|
committer | fche <fche> | 2005-10-18 17:59:17 +0000 |
commit | ce3187ac2f3f71f348fd7d4694b49c44f42337f3 (patch) | |
tree | ae3961d2c5a2f986fdc7846b4a95b2233031a462 /main.cxx | |
parent | 2508b230c643707830bfc491c1606fe6d81bc92d (diff) | |
download | systemtap-steved-ce3187ac2f3f71f348fd7d4694b49c44f42337f3.tar.gz systemtap-steved-ce3187ac2f3f71f348fd7d4694b49c44f42337f3.tar.xz systemtap-steved-ce3187ac2f3f71f348fd7d4694b49c44f42337f3.zip |
2005-10-18 Frank Ch. Eigler <fche@redhat.com>
PR 1477.
* main.cxx (main): Set PATH and LC_ALL, so
* buildrun.cxx (compile_pass, run_pass): ... and ...
* translate.cxx (emit_symbol_data): ... don't have to.
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -36,7 +36,7 @@ version () clog << "SystemTap translator/driver " << "(version " << VERSION << " built " << DATE << ")" << endl - << "Copyright (C) 2005 Red Hat, Inc." << endl + << "Copyright (C) 2005 Red Hat, Inc. and others" << endl << "This is free software; see the source for copying conditions." << endl; } @@ -251,6 +251,18 @@ main (int argc, char * const argv []) int rc = 0; + // override PATH and LC_ALL + char* path = "PATH=/bin:/sbin:/usr/bin:/usr/sbin"; + char* lc_all = "LC_ALL=C"; + rc = putenv (path) || putenv (lc_all); + if (rc) + { + const char* e = strerror (errno); + cerr << "setenv (\"" << path << "\" + \"" << lc_all << "\"): " + << e << endl; + } + + // arguments parsed; get down to business // Create a temporary directory to build within. @@ -468,7 +480,7 @@ main (int argc, char * const argv []) clog << "Keeping temporary directory \"" << s.tmpdir << "\"" << endl; else { - string cleanupcmd = "/bin/rm -rf "; + string cleanupcmd = "rm -rf "; cleanupcmd += s.tmpdir; if (s.verbose) clog << "Running " << cleanupcmd << endl; int status = system (cleanupcmd.c_str()); |