nixpkgs/pkgs/test/make-binary-wrapper/argv0.c

11 lines
236 B
C
Raw Normal View History

// 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);
}