Assigned 3/27/00, due Friday 3/31/00. Please submit your
source code via
HSP.
You may work with a partner.
Write a Linux
program that creates a child process, after which the
following steps take place indefinitely.
- the parent asks the user to type a string
- the parent stores the string in memory shared
with the child
- the parent sends a signal to the child
- the child prints a message making clear
that it received the signal and the user's string
- the child sends a signal to the parent
- the parent prints a message making clear that
it received the signal from the child
- go to step 1
On Wednesday, I'll talk in class about shared memory. You
can get started before then by leaving out step 2 and
the "user's string" part of step 4.
You'll need to use several system calls, including (but
not limited to) fork, signal, kill, and shmget.