This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS442/542 Assignment 3 – Command Pipelines and Job Control Max. Points: 45 Due: Multiple Command Pipelines: Wednesday, February 8 (11.59pm) Job Control: Monday, February 13, (before class) Program In this assignment, you will start with the work that you’ve already turned in and implement multiple command pipelines and job control. Multiple command pipelines execute commands such as cat < myinfile.txt | sort | grep u | wc -l -m > outfile A pipeline is a sequence of one or more simple commands separated by ’ | ’ tokens. Your shell should redirect the standard output of the command that precedes the ’ | ’ token to the standard input of the command that follows. It should redirect the standard input of the first command of a pipeline via the ’ < ’ token, if necessary; Similarly it should be acceptable to redirect the standard output of the last command of a pipeline via the ’ > ’ token. The processes belonging to a single command (simple command or pipeline of simple commands) are called a process group or job . In the above example the processes cat, sort, grep, and wc form a job. This is so that you can operate on all of them at once. For example, typing ctrl-c sends the signal SIGINT to terminate all the processes in the foreground process group. A session is a larger group of processes. Normally all the processes that stem from a single login belong to the same session. Usually, new sessions are created by the system login program, and the session leader is the process running the user’s login shell. The terminal from which the userthe session leader is the process running the user’s login shell....
View Full Document
- Spring '09
- Process group, Job control, Command Pipelines