Write and set up signal handlers for each of the following signals: SIGUSR1, SIGUSR2, and SIGHUP, Set up SIGIO as a signal to be ignored. (6 marks) a. The initial handler you should write for each of them should be stub routines that output a message: "Signal \# (SIGxxxx) received in function__FUNCTION_. Use strsignal to output the name of the signal using dprintf to send the output to a file. (The tail -f \& command will be demonstrated to allow you to follow text output to a file while a program is running. Take notes!) Display the name of the file, when it was compiled and the line \# of the output message. (2 marks) b. Test all of the above signal handlers. ( 2 marks) i. Verify that all of your signal handlers work sending your command servers each of the above signals from a 2nd terminal. ii. To set up a log file to record the output of dprintf(fd, fmtstr, argsl) use one of more of the following before running your command server: exec fd>/dev/tty \#isplays the messages on the current terminal exec fd>/dev/pts/n \#display on a different terminal that you own exec fd> logfile \#writes to a file tail -f logfile \& \#displays new data as it is appended to logfile tail f logfile >/dev/pts/n \& \#displays new data on an alternate terminal Hand in a log file (as opposed to a screen shot) showing that you tested all of the signals c. In a 3rd terminal attach strace to the pid of your command server. (2) i. Send each of the 4 signals to the pid of the command server. How does strace respond to each signal. Summarize the result. ii. Send each of the 4 signals to the parent pid of the command server. Answer the same question and hilite/describe any difference..