diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-08-09 13:59:44 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-08-09 13:59:44 -0400 |
commit | d0a7f5a99a13b1aa347ccb11bd63a1ce50b84979 (patch) | |
tree | 3e619e44824c4bb90c532aaf494c8f3559b01ded /main.cxx | |
parent | d9736de16f58966ff0fd7f9e7391d6beba8d7366 (diff) | |
download | systemtap-steved-d0a7f5a99a13b1aa347ccb11bd63a1ce50b84979.tar.gz systemtap-steved-d0a7f5a99a13b1aa347ccb11bd63a1ce50b84979.tar.xz systemtap-steved-d0a7f5a99a13b1aa347ccb11bd63a1ce50b84979.zip |
PR4225 and PR6826: expand & canonicalize executable path names process probes
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 25 |
1 files changed, 6 insertions, 19 deletions
@@ -696,25 +696,11 @@ main (int argc, char * const argv []) int rc = 0; - // override PATH and LC_ALL - const char *path = "/bin:/sbin:/usr/bin:/usr/sbin"; - rc = setenv("PATH", path, 1) || setenv("LC_ALL", "C", 1); - if (rc) - { - const char* e = strerror (errno); - cerr << "setenv (\"PATH=" << path << "\" + \"LC_ALL=C\"): " - << e << endl; - } - - // Get rid of a few standard environment variables (which might - // cause us to do unintended things). - rc = unsetenv("IFS") || unsetenv("CDPATH") || unsetenv("ENV") - || unsetenv("BASH_ENV"); - if (rc) - { - const char* e = strerror (errno); - cerr << "unsetenv failed: " << e << endl; - } + // For PR1477, we used to override $PATH and $LC_ALL and other stuff + // here. We seem to use complete pathnames in + // buildrun.cxx/tapsets.cxx now, so this is not necessary. Further, + // it interferes with util.cxx:find_executable(), used for $PATH + // resolution. s.kernel_base_release.assign(s.kernel_release, 0, s.kernel_release.find('-')); @@ -993,6 +979,7 @@ main (int argc, char * const argv []) if (rc || s.last_pass == 3 || pending_interrupts) goto cleanup; // PASS 4: COMPILATION + times (& tms_before); gettimeofday (&tv_before, NULL); rc = compile_pass (s); |