Created
February 5, 2022 02:43
-
-
Save comex/fcd2c329be12f656929b80c4ab15b1dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To build: gcc -o argc0 argc0.c | |
// To use: ./argc0 /bin/whatever | |
#include <unistd.h> | |
#include <assert.h> | |
#include <stdio.h> | |
int main(int argc, char **argv) { | |
assert(argc == 2); | |
execl(argv[1], NULL); | |
perror("execl"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment