Write a program that performs functions of the standard unix

Assignment Help C/C++ Programming
Reference no: EM131858174

Assignment

Write a program called signal.c that performs the functions of the standard UNIX kill command. We will call our program signal instead of kill so that it is clear we are not calling the built-in or standard kill command included on most systems).

The program should perform as follows:

1. If no command line arguments are provided, it should display the following usage information:

$ ./signal
Usage: ./signal [options] <pid>

Options:
-s <signal> Sends <signal> to <pid>
-l Lists all signal numbers with their names

2. If no specific signal is provided using -s, then the SIGTERM is sent to the specified pid by default:

$ ./signal 1289

3. If a specific signal is provided using -s, then that signal is sent to the specified pid instead of TERM:

$ ./signal -s 9 1289

4. If the special (non) signal number 0 is specified, report if the specified pid exists and is able to receive signals. For example, assuming pid 1289 exists and is ours, 1432 does not exist, and 1 (of course) exists and is not ours:

$ ./signal -s 0 1289

PID 1289 exists and is able to receive signals

or

$ ./signal -s 0 1432
PID 1432 does not exist

or

$ ./signal -s 0 1
PID 1 exists, but we can't send it signals
Hint: Refer to the following manual pages for helpful details:
$ man 2 kill
$ man 3 errno.

Reference no: EM131858174

Questions Cloud

Method of policing based on the broken windows theory : During the 1990s, New York City adopted a method of policing based on the broken windows theory, and crime subsequently decreased.
Explain pros and cons of moving enterprise-wide applications : Explain the pros and cons of moving enterprise-wide applications that have traditionally been supported on premises to the cloud.
Investigations into SME business related issues : Apply techniques of analysis and enquiry through initiating and carrying out investigations into SME business related issues/projects
What is distinctive about that subculture : What is a subculture that you identify with or are part of? What is distinctive about that subculture that other Americans may find unusual
Write a program that performs functions of the standard unix : Write a program called signal.c that performs the functions of the standard UNIX kill command. We will call our program signal instead of kill.
Reflect on your philosophy of guiding young childrens : How does this experience reflect your philosophy of how to support young children's cognitive development?
Discuss the reason the statement made by the nurse : Would you prefer to continue our discussion at a later time?" Discuss the reason the statement made by the nurse was appropriate at this time
How does light reset the biological clock : What evidence indicates that this area produces the rhythm itself? How does light reset the biological clock
How your group is organized is up to the group members : Since everyone may have different IDEs, use a Maven project template for your code. How your group is organized is up to the group members.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create functions for each body parts ex function torso

Create functions for each body parts ex: function torso for torso drawing. The only drawing primitive will be glutWireCube.

  Differences between structured and object-oriented programs

Examine the major differences between structured programs and object-oriented programs, and indicate whether your preference for designing and writing applications is using structure programming or object-oriented programming.

  Way to show difference between even and odd numbers

Using part (c), write some code to determine if one number divides another. In your solution, ask the user for both numbers and have your function answer.

  C -programming in what ways are the

in what ways are the initializationrepetition testand update steps alike for a sentinel-controlled loop and an

  Program that reads in a string of a defined size

Modular C program that reads in a string of a defined size from the keyboard and reports how many times each letter of the alphabet occurs within that string (ignoring case). It should also report how many non-letters are included in the string.

  Create program definition with the templates and methods

This program will store in miniVector v a list of 15 random integers from 0 to 99, then it will output the vector, sort the vector, then output it again sorted.

  Write a program manipulating a 2-dimensional array

Write a program manipulating a 2-dimensional array. Create constants to represent your number of students and number of assignments.

  Write a function that normally takes one argument

Write a function that normally takes one argument, the address of a string, and prints that string once. However, if a second, type int, argument is provided.

  Implement the readlog function

Implement the readLog function below, which is to (1) read the file, (2) populate a vector for each column, and (3) return the number of lines found.

  Write a function template named display

Write a function template named display() that displays the value of the single argument passed to it when the function is called.

  Make a program to play lottery

make a program to play lottery. The program randomly generates a Lottery of a three-digit number( any number from 100 to 999), prompts the user to enter a three-digit number, and determines

  Create the logic program

Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. Pass both values to a method that displays the amount you must save per month to achieve your goal.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd