23 lines
393 B
C
23 lines
393 B
C
|
|
#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
|
|
execvp(argv[1], argv+1);
|
|
|
|
fprintf(stderr, "exec failed: %s\n", strerror(errno));
|
|
return 2;
|
|
}
|