zombie.c

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <stdlib.h> int main () { printf("PARENT, MY PID = %d\n", getpid()); int status; pid_t pid = fork(); if (pid > 0) { //waitpid(pid, &status, 0); //wait(NULL); //signal(SIGCHLD, SIG_IGN); sleep(20); exit(0); } if (pid == 0) { printf("CHILD, MY PID = %d, MY PPID = %d\n", getpid(), getppid()); exit(0); } }
Editor Settings
Theme
Key bindings
Full width
Lines