42 Exam 06 Official

Pro tip: Do not try to use global variables with fork() . They are copied, not shared.

send_broadcast() : Iterates through active file descriptors and sends a formatted string to everyone except the sender. : Reset the read and write sets using a master copy. Call select() to wait for activity. 42 Exam 06

Use close() on every fd returned by pipe() or open() in both parent and child. Use valgrind --track-fds=yes on your local machine. Pro tip: Do not try to use global variables with fork()