nixpkgs-suyu/pkgs/test/make-binary-wrapper/argv0.c
Tobias Bergkvist b7d36b8d59 Add golden tests for make-binary-wrapper.
To run tests after cloning on linux, use the following:
nix-build pkgs/top-level/release.nix -A tests.make-binary-wrapper.x86_64-linux
2021-10-04 22:35:09 +02:00

10 lines
236 B
C

// makeCWrapper /path/to/some/executable \
--argv0 alternative-name
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char **argv) {
argv[0] = "alternative-name";
return execv("/path/to/some/executable", argv);
}