diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | main.cxx | 9 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2006-12-05 Frank Ch. Eigler <fche@redhat.com> + + PR 3648. + * main.cxx (main): Tweak error message for tapset script execution. + Also catch those clever rogues who use stdin. + 2006-11-30 Frank Ch. Eigler <fche@elastic.org> * tapsets.cxx (common_probe_entryfn_prologue): Tweak @@ -454,7 +454,10 @@ main (int argc, char * const argv []) int user_file_stat_rc = -1; if (script_file == "-") - s.user_file = parser::parse (s, cin, s.guru_mode); + { + s.user_file = parser::parse (s, cin, s.guru_mode); + user_file_stat_rc = fstat (STDIN_FILENO, & user_file_stat); + } else if (script_file != "") { s.user_file = parser::parse (s, script_file, s.guru_mode); @@ -529,8 +532,8 @@ main (int argc, char * const argv []) user_file_stat.st_dev == tapset_file_stat.st_dev && user_file_stat.st_ino == tapset_file_stat.st_ino) { - clog << "parse error: tapset file '" << globbuf.gl_pathv[j] - << "' is already processed as the user script." << endl; + clog << "usage error: tapset file '" << globbuf.gl_pathv[j] + << "' cannot be run directly as a session script." << endl; rc ++; } |