Fortuned's Finishing up and Cleaning Up pipe_done: /* let our caller know that this is it */ close(fd); usleep(10); /* we don't need the pipe to the fortune binary anymore */ pclose(pipe_in); /* restore SIGPIPE handling to default */ signal(SIGPIPE, SIG_DFL); /* tada! let's brag in the logs */ log("fortuned: %d satisfied customers serverd!", ++counter); } cleanup: if (fd) close(fd); cleanup(errstring); }