Warning!

Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!

bench: forward commandline arguments
authorMichael Gebetsroither <michael.geb@gmx.at>
Sun Nov 04 11:54:48 2007 +0100 (13 months ago)
changeset 68de8e50f0a99f
manifestde8e50f0a99f
parent 67089d546d4ffe
child 69828c6a2c0a2e
tag0.13
bench: forward commandline arguments
bench.cpp
debian/changelog
--- a/bench.cpp Wed Oct 31 16:22:32 2007 +0100
+++ b/bench.cpp Sun Nov 04 11:54:48 2007 +0100
@@ -18,11 +18,12 @@ using namespace gebi;
static char* to_exec_;
+static char** args_;
void execChild()
{
- int ret = execlp(to_exec_, to_exec_, (char*)0);
+ int ret = execvp(to_exec_, args_);
if(ret < 0)
perror("execlp");
exit(ret);
@@ -36,8 +37,9 @@ int main(int argc, char *argv[])
struct rusage ru;
to_exec_ = NULL;
- if(argc == 2) {
+ if(argc >= 2) {
to_exec_ = argv[1];
+ args_ = &argv[1];
} else {
fprintf(stderr, "Error: please give me the executable to benchmark\n");
exit(1);
--- a/debian/changelog Wed Oct 31 16:22:32 2007 +0100
+++ b/debian/changelog Sun Nov 04 11:54:48 2007 +0100
@@ -3,9 +3,10 @@ grml-debugtools (0.13) unstable; urgency
* grml-kernelconfig: added udiff command
* fix typo in upgrade-bloatscanner.1.txt
* require python-apt >= 0.7.3.1 for upgrade-bloatscanner
- * upgrade-bloatscanner: added -h/--help + usage example
+ * upgrade-bloatscanner: added -h/--help + usage example
+ * bench: forward commandline arguments
- -- Michael Gebetsroither <gebi@grml.org> Wed, 31 Oct 2007 16:21:12 +0100
+ -- Michael Gebetsroither <gebi@grml.org> Sun, 04 Nov 2007 11:54:34 +0100
grml-debugtools (0.12) unstable; urgency=low