Implement a simple linux shell in c

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

Solve question and the project in C language.

Question - Implement a simple Linux shell in C capable of executing a sequences of programs that communicate through a pipe. For example, if the user types ls | wc, your program should fork off the two programs, which together will calculate the number of files in the directory. For this, you will need to use several of the Linux system calls described in this chapter: fork, exec, open, close, pipe, dup2 and wait. Note you will to replace stdin and stdout in the child process with the pipe file descriptors; that is the role of dup2.

Project - Questions:

1. Rewrite the previous programs for multiple pipes such as one master with multiple clients; - select (_, _);

2. Can you rewrite the multiple-pipe program using shared memory functions: - shmat(), shmget(), shmcntl() . . .

Reference no: EM131389484

Questions Cloud

Explain who is correct in given contention : Lundgren claimed that Berlinair was not financially able to undertake the BFR contract and therefore no usurpation of corporate opportunity could occur. Who is correct? Explain.
Marketing plan for dave and busters : Write the marketing plan for dave and Busters" Promotions " and "place." Here are the requirements
What are the ethical implications of this for the engineers : Why, or why not? What are the ethical implications of this for the engineers working for an automobile manufacturer?
An action in equity for dissolution of the corporation : The stock in Hotel Management, Inc., a hotel management corporation, was divided equally between two families. - As a result, the owners of half the stock brought an action in equity for dissolution of the corporation. Will they succeed? Explain.
Implement a simple linux shell in c : Implement a simple Linux shell in C capable of executing a sequences of programs that communicate through a pipe. For example, if the user types ls | wc, your program should fork off the two programs, which together will calculate the number of fi..
Discuss about the post given below : WidgeCorp is considering branching out into cold beverages. You have been asked to come up with a regression model to forecast monthly sales of cold beverages for the next year. Think about what variables you might include in your model.
What are the rights of a shareholder : What are the rights of a shareholder who dissents from a proposed sale or exchange of all or substantially all of the assets of a corporation other than in the usual and regular course of its business?
What ethical responsibility for the accidents does it have : Given that McDonnell Douglas management knew that there was a problem with the cargo door as early as 1970, when the prototype failed, and knew that there could be catastrophic failure of the airplane's superstructure, leading to an accident
Explain whether she is correct in given contention : Cutler Company was duly merged into Stone Company. Yetta, a shareholder of the former Cutler Company, having paid only one-half of her subscription, is now sued by Stone Company for the balance of the subscription.- Explain whether she is correct.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  C program to calculate power loss in transmission line

Write program in C to calculate the power loss in transmission line with resistance of 0.05 ohms/mile. Calculate power loss if 500 kW of power is transmitted from power generation station

  Create an object-oriented solution

Create an object-oriented solution that performs the following tasks:Allows for the entry into the phone book using pre-identified information or user input information

  Why can not whitespace be read with the extraction operator

What is the difference between formatted input and unformatted input? Why can't whitespace be read with the extraction operator? What is a stream?

  Write a function that returns a pointer to an array

Write and show a function that takes an integer n and returns a pointer to an array of the first n cubes (0, 1, 8, 27, and so on).

  Identify two key oo concepts and explain them as if you

1. discuss the advantages and disadvantages of both the structured and object-oriented oo paradigm in programming. why

  The purpose of the program is to prepare an accounting

the purpose of the program is to prepare an accounting database for e.g. a dorms kitchen to keep track of the

  Program simulates the game of paper, rock, scissors

This program simulates the game of paper, rock, scissors. At each turn each player enters R, P, or S (either upper or lower case) to indicate their choice. The program announces the winner along with a message indicating the reason (such as Paper cov..

  Write an http request from c++ using libcurl

Write an HTTP request from C++ using libcurl - his time, there are no compilation errors but the code terminates automatically without any errors.

  Implements a cyclic redundancy check algorithm

Write a C++ program that Implements a cyclic redundancy check algorithm in C++: The program should provide a mechanism for inputting a stream of data 128 bytes in length. It should calculate a 32-bit CRC for that data. It should output the data strea..

  Write a statement that writes both of their values

Write a statement that writes both of their values to standard output in the format

  Create a graphical calculator with buttons that can add

create a graphical calculator with buttons that can add subtract multiply divide - sin cos tan clear and modulus.write

  Write a c program to print permutation

Given integer n and permutation of numbers 1,2,..n-1, c program to print permutation that lexicograghically precedes given input permutation if permutation is least print input permutation itself

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