Write a shell that is similar to Fig. 1-10 but contains enough code that it actually works
Question:
Write a shell that is similar to Fig. 1-10 but contains enough code that it actually works so you can test it. You might also add some features such as redirection of input and output, pipes, and background jobs.
Transcribed Image Text:
while (TRUE) { type_prompt(); } read command (command, parameters); if (fork() != 0) { /* Parent code. */ } waitpid (-1, &status, 0); } else { /* Child code. */ execve(command, parameters, 0); /* repeat forever */ /* display prompt on the screen */ /* read input from terminal */ /* fork off child process */ /* wait for child to exit */ /* execute command */ Figure 1-10. A stripped-down shell. Throughout this book, TRUE is assumed to be defined as 1.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 40% (5 reviews)
include include include include include define TRUE 1 ...View the full answer
Answered By
Vincent Omondi
I am an extremely self-motivated person who firmly believes in his abilities. With high sensitivity to task and operating parameters, deadlines and keen on instructions, I deliver the best quality work for my clients. I handle tasks ranging from assignments to projects.
4.90+
109+ Reviews
314+ Question Solved
Related Book For
Operating Systems Design And Implementation
ISBN: 9780131429383
3rd Edition
Authors: Andrew Tanenbaum, Albert Woodhull
Question Posted:
Students also viewed these Computer science questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
1.Discuss 5 (five) direct benefits and 5 (five) indirect benefits that GovTech would have if the Enterprise Architecture is successfully implemented in GoxTech (500 words) 2.Discuss 5 (five) key...
-
Pick a Nigerian brand that has been very successful competing against the bigger global brands in its product category. What are the elements of its strategy that have enabled it to achieve this...
-
The board of directors of Pictures Plus authorizes the issue of $6,000,000 of 8%, 15-year bonds payable. The semiannual interest dates are May 31 and November 30. The bonds are issued on May 31,...
-
How is a project classification scheme (for example, replacement, expansion into new markets, and so forth) used in the capital budgeting process? AppendixLO1
-
C8.1. Why is income in the equity portion of the balance sheet called "dirty-surplus" income?
-
The following defined pension data of Doreen Corp. apply to the year 2014. Defined benefit obligation, 1/1/14 (before amendment) .... $560,000 Plan assets, 1/1/14 ................... 546,200 Pension...
-
Inventory Analysis The following data were extracted from the income statement of Brecca Systems Inc.: Current Year Preceding Year Sales $9,700,000 $7,175,000 Beginning inventories 420,000 400,000...
-
Write a program (or series of programs) to test all the MINIX 3 system calls. For each call, try various sets of parameters, including some incorrect ones, to see if they are detected.
-
The initial versions of the Pentium could not support a virtual machine monitor. What essential characteristic is needed to allow a machine to be virtualizable?
-
In testing one mean, the value of what parameter is stated in the null and alternative hypotheses?
-
PP Company purchases a material that is then processed to yield three chemicals: anarol, estyl, and betryl.In June, PPC purchased 10,000 gallons of the material at a cost of $250,000, and the company...
-
Suppose Boyson Inc. free cash flow for the next year is $ 1 5 0 , 0 0 0 and the FCF is expected to grow a concert rate of 6 . 5 % if WACC is 1 2 . 5 % what is the market value of the firm?
-
An eight lane urban freeway (four lanes in each direction) is on rolling terrain and has 11-ft lanes with a 4-ft right-side shoulder. The interchange density is 1.25 per mile. The base free-flow...
-
For the following business events, please indicate the increase (+) or decrease (-) on the following income statement and balance sheet categories. If there is no effect, leave the box blank. If...
-
4. Change the magnet to the original orientation and drag through the coil. a. What happens to the voltage and light bulb as the North Pole moves through the coil? b. What happens to the voltage and...
-
Ronald Rawls and Zabian Bailey were in an auto accident in Bridgeport, Connecticut. Bailey rear-ended Rawls at a stoplight. Evidence showed it was more likely than not that Bailey failed to apply his...
-
Based on the scenario described below, generate all possible association rules with values for confidence, support (for dependent), and lift. Submit your solutions in a Word document (name it...
-
Implement the containKey(k) method, as described in Exercise R-10.3, for the SortedTableClass.
-
Consider lines 3133 of Code Fragment 10.8 in our implementation of the class ChainHashMap. We use the difference in the size of a secondary bucket before and after a call to bucket.remove(k) to...
-
Modify the Pair class from Code Fragment 2.17 on page 92 so that it provides a natural definition for both the equals( ) and hashCode( ) methods.
-
Suppose I have computed the cost of carbon per mile for my car at 0 . 0 1 2 per mile. Assume that the interest rate is 4 % and that I drive the car 2 8 , 0 0 0 miles per year. What is the present...
-
Imagine that in stable growth period, the firm earns ROIC of 10% and has after tax EBIT of 200 and reinvestment $ of 40. What is the steady state growth rate? 20% O 10% 2%
-
Tanner-UNF Corporation acquired as a long-term investment $160 million of 5.0% bonds, dated July 1, on July 1, 2021. Company management has the positive intent and ability to hold the bonds until...
Study smarter with the SolutionInn App