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,...
-
An electronic device is to be cooled in air at 20?C by an array of equally spaced vertical rectangular fins as shown in the sketch below. The fins are made of aluminum and their average temperature,...
-
If your personal financial statements indicate that you have a deficit, what might you do to change your financial situation?
-
Items 1 through 9 are selected questions of the type generally found in internal control questionnaires used by auditors to obtain an understanding of internal control in the sales and collection...
-
You are an accountant at a large publicly-held tech company, and your manager has told you that your department will be visited by auditors from the Public Company Accounting Oversight Board (PCAOB)...
-
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?
-
Given the following information for Rosato Pizza Co., calculate the depreciation expense: Sales = $41,000; Costs = $19,500; Addition to retained earnings = $5,100; Dividends paid = $1,500; Interest...
-
Submit a a 3C+Q response to the following case study in regards "Hazy Forecasts of Marijuana Tax Revenue in Washington State." Compliment: Connect: Comment: Question: In hindsight, how should the...
-
1. Solve the following linear systems. a. [x, y] = [1, 6]+s[3, -2] b. [x, y] [-12, -7]+s[8, -5] [x, y] [4, 4]+t[-6, 4] [x, y] [2, -1]+t[3, -2] C. [x, y] [16, 1]+s[5, 1] d. [x, y] [11, 12]+s[2,7] [x,...
-
Rough endoplasmic reticulum is characterized by what?
-
At a recent board meeting of a perfectly competitive firm, the board considered a staff proposal the firm shut down their plant in Miami until a buyer is found. The Miami plant currently loses...
-
1. Investigate the following graph of GDP per Capita vs. Life Expectancy from Gapminder :...
-
What are consolidated financial statements and what do they attempt to accomplish?
-
On July 1, 2011, Flashlight Corporation sold equipment it had recently purchased to an unaffiliated company for $480,000. The equipment had a book value on Flashlights books of $390,000 and a...
-
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.
-
10. Capital losses on the disposition of listed personal property can be deducted, but only against net capital gains on listed personal property. Question 10 options: True False
-
Form utility is the benefit marketing provides by _ _ _ _ _ _ _ _ _ _ . allowing the consumer to own, use, and enjoy the product storing products until they are needed making products available where...
-
In 2020 Maria has one child, age 7, for whom she claims the child tax credit. Maria's earned income is $8,000 and her AGI is zero. How much if the child tax credit is refundable to Maria? a. $2000 B....
Study smarter with the SolutionInn App