Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
910 B
1
Indexable
                if(P6 == 0)
                {
                        printf("In child process P6 with PID = %d and PPID = %d\n", getpid(), getppid());

                        P6 = fork();

                        if(P6 == 0)
                        {
                                printf("In child process P7 with PID = %d and PPID = %d\n", getpid(), getppid());
                                kill(getpid(), SIGKILL);
                        }

                        P6 = fork();

                        if(P6 == 0)
                        {
                                printf("In child process P9 with PID = %d and PPID = %d\n", getpid(), getppid());
                        }

                }
        }
        else if(P1 == 0)
        {
                printf("In child process P3 with PID = %d and PPID = %d\n", getpid(), getppid());
        }

        return 0;
}
Leave a Comment