Skip to content

Instantly share code, notes, and snippets.

@johnf
Created November 14, 2011 06:32
Show Gist options
  • Save johnf/1363386 to your computer and use it in GitHub Desktop.
Save johnf/1363386 to your computer and use it in GitHub Desktop.
Pass argc to exec
#include <unistd.h>
int main(int argc, char *argv[]) {
execv("/bin/ls", argv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment