Skip to content

Instantly share code, notes, and snippets.

@comex
Created Feb 5, 2022
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