Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / test / make-binary-wrapper / chdir.c
blob9e0b7e2c7f52af3844d54c14be556f9323c5d1ee
1 #include <unistd.h>
2 #include <stdlib.h>
3 #include <stdio.h>
5 #define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
7 int main(int argc, char **argv) {
8 assert_success(chdir("./tmp/foo"));
9 argv[0] = "/send/me/flags";
10 return execv("/send/me/flags", argv);