diff options
author | comex | 2015-01-20 21:48:38 -0500 |
---|---|---|
committer | comex | 2015-01-20 21:58:52 -0500 |
commit | c2728b5b3416d3bb2dedb62366a8e87e05d8629a (patch) | |
tree | 2b9bc6f8c365237ceeac980498d6b24df80b6fa3 /test/test-inject.c | |
parent | revert THAT WHOLE THING because we can't actually use it for inject (diff) | |
download | substitute-c2728b5b3416d3bb2dedb62366a8e87e05d8629a.tar.gz |
...
Diffstat (limited to '')
-rw-r--r-- | test/test-inject.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test-inject.c b/test/test-inject.c new file mode 100644 index 0000000..6cf0404 --- /dev/null +++ b/test/test-inject.c @@ -0,0 +1,17 @@ +#include "substitute.h" +#include "substitute-internal.h" + +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char **argv) { + if (argc <= 1) { + printf("usage: test-inject <pid>\n"); + return 1; + } + int pid = atoi(argv[1]); + char *error = NULL; + int ret = substitute_dlopen_in_pid(pid, "/tmp/hello", 0, &error); + printf("ret=%d err=%s\n", ret, error); +} |