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 program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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