1int main(){
2 pid_t pid = fork();
3 if (pid == 0) {
4 printf("HC: hello from child\n");
5 exit(17);
6 } else {
7 int child_status;
8 printf("HP: hello from parent\n");
9 waitpid(pid, &child_status, 0); // Waits for child to end
10 printf("CT: child result %d\n", WEXITSTATUS(child_status));
11 }
12 printf("Bye\n");
13 return 0;
14}