summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorroland <roland>2005-07-29 08:36:56 +0000
committerroland <roland>2005-07-29 08:36:56 +0000
commitd54d466112572d6037ace8f03fb153586b533e02 (patch)
tree1714ddab799d58b1c6f5edf68a245ce54ee68bf2 /main.cxx
parent4bc7bc0ba2897e5bbd09588048bb9267ea02fec8 (diff)
downloadsystemtap-steved-d54d466112572d6037ace8f03fb153586b533e02.tar.gz
systemtap-steved-d54d466112572d6037ace8f03fb153586b533e02.tar.xz
systemtap-steved-d54d466112572d6037ace8f03fb153586b533e02.zip
2005-07-29 Roland McGrath <roland@redhat.com>
* main.cxx (main): Check return value of system.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/main.cxx b/main.cxx
index 9368573e..e1d79b26 100644
--- a/main.cxx
+++ b/main.cxx
@@ -32,7 +32,7 @@ using namespace std;
void
usage (systemtap_session& s)
{
- clog
+ clog
<< "SystemTap translator/driver "
<< "(version " << VERSION << " built " << DATE << ")" << endl
<< "Copyright (C) 2005 Red Hat, Inc." << endl
@@ -43,7 +43,7 @@ usage (systemtap_session& s)
<< endl
<< " or: stap [options] - Run script on stdin."
<< endl
- << " or: stap [options] -e SCRIPT Run given script."
+ << " or: stap [options] -e SCRIPT Run given script."
<< endl
<< endl
<< "Arguments:" << endl
@@ -70,7 +70,7 @@ usage (systemtap_session& s)
<< " " << s.module_name << endl
<< " -o FILE send output to file instead of stdout" << endl
<< " -k keep temporary directory" << endl;
- // -d: dump safety-related external references
+ // -d: dump safety-related external references
exit (0);
}
@@ -284,7 +284,7 @@ main (int argc, char * const argv [])
else
s.library_files.push_back (f);
}
-
+
globfree (& globbuf);
}
}
@@ -389,7 +389,7 @@ main (int argc, char * const argv [])
<< "Try again with '-v' (verbose) option." << endl;
if (rc || s.last_pass == 3) goto cleanup;
-
+
// PASS 4: COMPILATION
rc = compile_pass (s);
@@ -421,7 +421,9 @@ main (int argc, char * const argv [])
string cleanupcmd = "/bin/rm -rf ";
cleanupcmd += s.tmpdir;
if (s.verbose) clog << "Running " << cleanupcmd << endl;
- (void) system (cleanupcmd.c_str());
+ int status = system (cleanupcmd.c_str());
+ if (status != 0 && s.verbose)
+ clog << "Cleanup command failed, status: " << status << endl;
}
}