Reference no: EM131166024
develop a C program for Linux called pipes.c that does the following:
In the main() function, it creates a pipe using the pipe() function, then creates two child processes with fork(). Child 1 redirects stdout to the write end of the pipe and then executes with execlp() the "ls -al" command. Child 2 redirects its input from stdin to the read end of the pipe, then it executes the "sort -n -k 5" command.
After creating both children, the parent process waits for them to terminate before it can exit.
Note that you may have to create Child 2 first, followed by Child 1.
The parent program does the same thing as a shell that runs the command "ls -al | sort -r -n -k 5".
You must use the fork(), pipe(), dup2(), close(), execlp() functions (or other exec() variation). You can edit your program with the geditapplication, available from the command line. Or install emacs using command "sudo apt-get install emacs" and learn to use it.
How can you make improvements with a new system
: What does the credit card charge form indicate about the existing system? How can you make improvements with a new system?
|
Explain the four elements of negligence
: Discuss the court's findings and explain how the court determined this was a negligence case rather than an intentional tort. Explain the four elements of negligence and the reasoning of the court when analyzing each element.
|
What implications does the business model have for systems
: Do you agree with Dogster's view, or should companies aim for "zero-defect" operations? Why or why not? What implications does this business model have for systems analysts?
|
What are ebit under the best case scenario
: The estimated sales price is $80 a unit, plus or minus 4 percent. Variable costs are estimated at $55 a unit, plus or minus 5 percent, and the fixed costs are $25,000, plus or minus $25,000. What are EBIT under the best case scenario?
|
Develop a c program
: develop a C program for Linux called pipes.c that does the following: In the main() function, it creates a pipe using the pipe() function, then creates two child processes with fork(). Child 1 redirects stdout to the write end of the pipe and then ex..
|
What techniques can you use to identify improvements
: What techniques can you use to identify improvements? Choose one technique and apply it to this situation- what improvements did you identify?
|
Explain the costs and the benefits of the production
: Why do you think your policy would work in reducing the total amount of emissions? In your answer, explain the costs and the benefits of the production and consumption of the good, as well as the negative externality
|
Which approach seems to be more successful
: A system development project may be approached in one of two ways: as a single. Which approach seems to be more successful? Why do you suppose that this is true?
|
What is the value of expressing one probability in events
: If you roll two dice, what is the probability of an even sum or a sum of 8 or more?
|