aboutsummaryrefslogtreecommitdiff
path: root/src/run_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/run_cmd.c')
-rw-r--r--src/run_cmd.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/run_cmd.c b/src/run_cmd.c
deleted file mode 100644
index aa15964..0000000
--- a/src/run_cmd.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#define _GNU_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int main(int argc, char* argv[]) {
- if (argc < 3) {
- printf("Usage: %s <ld_preload> <cmd> [cmd args]\n");
- printf("\tset LD_PRELOAD to ld_preload and call execvp <cmd> [cmd args]\n");
- return 1;
- }
-
- // Overwrite LD_PRELOAD.
- setenv("LD_PRELOAD", argv[1], 1);
-
- // Run cmd.
- execvp(argv[2], &argv[2]);
-}