#include <stdio.h>
#include <unistd.h>

int main (int argc, char** argv) {
    if (argc < 2) {
        fprintf(stderr, "forkit: give something to fork\n");
        return 1;
    }

    pid_t child_pid = fork();
    if (child_pid < 0) {
        perror("forkit");
        return 1;
    }

    if (child_pid > 0) {
        printf("forkit: great success\n");
        return 0;
    }

    execvp(argv[1], &argv[1]);
    perror("forkit");
    return 1;
}
