Skip to content

Instantly share code, notes, and snippets.

@comex
Created February 5, 2022 02:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
// 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