Create a file ans.txt (with your name/alpha at
the top!), copy and paste the
questions below into it, and add the answers:
1. Read the UNIX man page in Section 3HEAD for the signal header
file to answer these questions:
a. What number corresponds to the SIGKILL signal?
b. If the disposition for a signal is SIG_DFL with a default
action of Core, what happens?
2. Read the UNIX man page in Section 1 for the kill shell utility
program to answer these questions:
a. What is the full path name for this utility program?
b. Show the shell command you would give to determine all of the
signals that are supported on the systems in MI302/MI316.
c. Write three different ways to send the SIGKILL signal to process
id 2010 from the shell.
3. Read the UNIX man page in Section 2 for the kill system call to
answer these questions:
a. What header files must be #include'd to use this system call?
b. Give 3 reasons why a call to kill() might fail.
4. Make sure you have two shell windows open. The tar archive contains
an executable program named banner. Run this program in one of your
shell windows. Note: You need to run it as ./banner.
a. Try and terminate it by entering ^C. What is printed? Explain
what happened.
b. Try to suspend it by entering ^Z. What is printed? Explain what
happened.
5. In the other shell window:
a. Determine the process id of the banner program.
b. Use the kill shell utility program to send it the SIGTSTP
signal. What keyboard sequence causes the shell to send a
SIGTSTP signal?
c. Use the kill shell utility program to send it the SIGTERM
signal. What is printed? Explain what happened.
d. Use the kill shell utility program to send it the SIGSEGV
signal. What is printed? Explain what happened.
e. What is another signal that you could have sent to terminate the
running banner program? Explain why this terminates the process.
6. What's the full path to the banner program you get by entering
banner (not ./banner) at the command prompt? What does that banner
program do?