2023-01-08 17:23:25 +01:00
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
|
|
|
|
if( argc < 2 ) {
|
|
|
|
fprintf(stderr, "missing arguments\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
setenv("LD_PRELOAD", "/usr/local/lib/libqtdebugger.so", 1);
|
|
|
|
|
|
|
|
// should never return
|
2023-01-12 19:11:22 +01:00
|
|
|
execvp(argv[1], argv+1);
|
2023-01-08 17:23:25 +01:00
|
|
|
|
|
|
|
fprintf(stderr, "exec failed: %s\n", strerror(errno));
|
|
|
|
return 2;
|
|
|
|
}
|