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

  Question rearding the software process models

Waterfall, V-shape, and Rapid Application Development (RAD) are among well-established software process models that have been used to develop software

  Determine whether or not there is data pertaining

For each employee you are to compute the number of overtime hours worked by that employee, the salary, and the overtime pay. An employee earns straight time for the first forty hours of work, time-and-a-half for up to the first 10 hours in excess ..

  Design a modularized body mass index program

Design a modularized Body Mass Index (BMI) Program which will calculate the BMI of a team player. The formula to calculate the BMI is as follows:  BMI = Weight * 703/Height2

  Write a program to print out 30 real random numbers

Write a program to print out 30 Real Random Numbers with specific limitation (e.g. the real random numbers should be the real number between min=11.1 to  max=222.2).

  Multidimensional arrays

multidimensional arrays to life, let's consider a specific example: How can you visualize a 4-dimensional array? How can you give meaning to each dimension this array has? What kind of application would such an array be useful for?

  Function that accepts a score for a driver''s license

Write a function that accepts a score for a driver's license facility, an int or a float, and returns a letter. If the score passed in is less than 75, then the letter returned is an F for Fail. Otherwise, the letter returned is a P for Pass.

  Write an lc-3 machine language program

Write an LC-3 machine language program starting at location x3000 which divides the number in memory location x4000 by the number in memory location x4001 and stores the quotient at x5000 and the remainder at x5001.

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

  Explain how to implement two stacks in one array

Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number of elements in both stacks together is n. The PUSH and POP operations should run in O(1) time. You may provide your approac..

  Take four unsigned char bytes and combine

Take four unsigned char bytes and combine them into a single integer type. You will needed shifts and one of the logical bit operators.

  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 function named shift_right

The function should make sure that left is less than or equal to right, and that distance is greater than zero. If either of these conditions fails, the function should return the value 1 to indicate an error.

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