#include #include #include #include #include #include int main (int argc, char *argv[]) { char *args[] = { "/bin/sh", "-c", "exit", "0", NULL }; struct timeval start, end; long long reps; int i; int use_vfork = 1; if (argc >= 2) use_vfork = 0; printf("using %s\n", use_vfork ? "vfork" : "fork"); gettimeofday(&start, NULL); #define NR 1000 for (i=0; i