42 Exam 06 Direct
Yes. If you write to a pipe with no reader, your process receives SIGPIPE . Ignore it with signal(SIGPIPE, SIG_IGN) or handle it if the subject requires.
┌───────────┐ │ select() │◄───── Monitors all file descriptors └─────┬─────┘ │ ┌──────────────┼──────────────┐ ▼ ▼ ▼ [Server Socket] [Client 1] [Client 2] (New Connects) (Sends Data) (Idle/Silent) 42 Exam 06
Use the pipe as a control channel. Parent writes "EXIT" to the pipe, children read from it. 42 Exam 06
While the actual exercises rotate, the pattern is fixed. You usually get : 42 Exam 06