
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Six questions related to various networking issues in system programming, including remote procedure calls, zombie children in parent-server strategy, buffer overflows, and server crashes. The questions are based on the cs241 system programming course taught by klara nahrstedt and are taken from her shadow homework posted on may 1, 2006.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

CS241 System Programming Instructor Klara Nahrstedt Posted May 1, 2006
For (; ;) { Wait for a client request on the listening file descriptor Create a private two-way communication channel to the client Fork a child to handle the client Close file descriptor for the private communication channel Clean up zombie children }
if ((child = fork()) == -1) { perror(“failed to fork a child”); return 1; } if (child == 0) bytecopied = copyfile(STDIB_FILENO, communfd); else bytecopied = copyfile(communfd, SDTOUT_FILENO);
What happens if we do this replacement?