Programs start busy-waiting. This may be implemented in future versions of the system. At least, it has here. If no data had arrived, this will be zero, and future calls using the same timeout structure will immediately return. Some versions of Mosaic were at one time notable for this problem.
Interrupted system calls.
The program is not expecting that to happen, so bottles out. You may choose between two fixes. Because you're calling it wrong. The first argument to execl is the program that you want to run. The second and subsequent arguments become the argv array of the program you're calling.