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

  Explain roles of hardware and software components

Discussion is designed to help you understand the roles of hardware and software components in a modern computer system. For the purposes of this Discussion, assume that you are heading a team of 25 people working on a software development project..

  Program that will ask for a month

Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.

  Provider database

For a review of the complete rubric used in grading this exercise, click on the Assignments tab, then on the title Case Study Part 2 - Provider Database (Access)-click on Show Rubrics if the rubric is not already displayed.

  Write statements that assign random integers to the variable

Write statements that assign Random integers to the variable n in the following ranges.

  Write a c program generates a ordered sequence of random num

Write a C program Gen.c that generates a ordered sequence of 20 random numbers within a range of 1000 to 9999. The program is invoked by a command line % gen datfile1

  Prepare a system to meet companys needs

You are tasked to utilize files, arrays, string manipulation tools, various loops, logical functions and keyboard data entry methods to prepare a system to meet their needs.

  Write recursive method to print all permutations of a string

Write a recursive method to print all the permutations of a string. For instance, for a string abc, the printout is: abc acb bac bca cab cba. Use the following two methods, the second one being a helper method.

  Describe built-in functions in c++

Describe Built-in Functions in C++

  Struct definition as the page table entry

Struct definition as the page table entry and the array that follows it as the page table. Implement the software simulation of least recently used algorithm in two C++ functions. Should RUN on UNIX.

  Display the appropriate letter grade for the number grade

Execute the script and then input 100, 90, and 100 when prompted for each grade.

  Write a java class named mylinkedlist and implement it

void updateList(MyLinkedList otherlist) that will update the current list with a given otherlist. If an element in current list exists in the otherlist then replace (update) it, otherwise insert (add) it using the above insertSortNoDuplicate metho..

  Statements that return container data only return container

Make sure all return statements that return container data only return container data.  If a return statement returns container data under certain conditions, but another return statement returns something that is not container data under other condi..

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