Skip to content

Instantly share code, notes, and snippets.

@tanakamura
Created September 3, 2016 05:51
Show Gist options
  • Save tanakamura/bee05aca131c897d9407faf164fe2c9f to your computer and use it in GitHub Desktop.
Save tanakamura/bee05aca131c897d9407faf164fe2c9f to your computer and use it in GitHub Desktop.
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int n = 0;
char buf[1024];
if (argc >= 2) {
n = atoi(argv[1]);
}
if (n >= 1024) {
return 0;
}
sprintf(buf, "%d", n+1);
execlp("./execbench",
"./execbench",
buf,
NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment