repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
biome: 1.9.2 -> 1.9.3
[NixPkgs.git]
/
pkgs
/
test
/
make-binary-wrapper
/
chdir.c
blob
9e0b7e2c7f52af3844d54c14be556f9323c5d1ee
1
#include <unistd.h>
2
#include <stdlib.h>
3
#include <stdio.h>
4
5
#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)
6
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
);
11
}