Child processes won't die in C program
问题 I'm writing a C program that parses input from STDIN into words, generates a number of sort processes specified by the numsorts variable, pipes the words in a round-robin fashion to each of the sort processes, and sends the output of the sorts to STDOUT. My program works as desired and exits cleanly if the number of specified sort processes is 1, but the sort child processes don't die if the number of sort processes is greater than 1, and my program gets stuck waiting for them. The strangest