The following code will create a zombie child process because the child process is terminated and the parent process is busy in
a loop without calling wait() function. now, modify this program by handling sigchld signal so that no zombie process is created. the parent process cannot call wait()directly in the main(). however, calling wait() from inside the signal handler is fine. the main still must go to the infinite while loop. you can add helper functions. int main(){
if (fork()== 0) // child process
exit(0);
else // parent process
while (true);
}
Space — each pressing of the key will be displayed as · Non-breaking space (°) is a space character that prevents an automatic line break at its position.