* grapher/grapher.cxx (main): Pass program arguments to stap
#include <cerrno>
#include <cmath>
#include <cstdio>
+#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
void handleChild(int signum, siginfo_t* info, void* context)
{
char buf[1];
+ ssize_t err;
buf[0] = 1;
- ssize_t err = write(signalPipe[1], buf, 1);
+ err = write(signalPipe[1], buf, 1);
}
}
dup2(pipefd[3], STDERR_FILENO);
for (int i = 0; i < 4; ++i)
close(pipefd[i]);
-
- execlp("stap", "stap", argv[1], static_cast<char*>(0));
+ char argv0[] = "stap";
+ argv[0] = argv0;
+ execvp("stap", argv);
exit(1);
return 1;
}