#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

int main(void)
{
    int pid,x=2;
    if (0 == (pid =fork())) {
        fork();
        pid=fork();
        if (pid==0) {
            x--;
        }
    }
    else{
        printf("aki\n");
        execl("bin/date", "date",0);
        x=x+2;
    }

    printf("pid=%d, x=%d\n", pid,x);
    exit(0);
}