Question
In this assignment, you will use signals to simulate a ping/pong game between two processes. Write three programs named ping.c, pong.c and pingpong.c respectively. The
In this assignment, you will use signals to simulate a ping/pong game between two processes. Write three programs named ping.c, pong.c and pingpong.c respectively. The ping will send a signal to pong, when pong receives the signal from pong, it will sent a signal to pingpong as well as to ping. When pingpong receives any signal, it will display either Ping or Pong depending on the source of the signal. This should be written in C or C++ and should be able to run on a Linux or UNIX system.
Here is how the programs should be run (run each program on different terminal or in the background). $./ping $./pong $ ./pingpong Ping Pong Ping Pong . . .
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started