Lab 9: Osh II

In this lab, you’re going to finish writing your shell. After this lab, your shell will

  1. support file redirection (e.g., $ echo foo >output.txt); and
  2. handle the interrupt (Ctrl-C) and quit (Ctrl-\) signals.

You will learn

  • how to launch processes with stdin/stdout/stderr connected to files;
  • how to open files with more complex open options; and
  • how to install signal handlers and respond to signals.

Preliminaries

Reuse your assignment repository from the previous lab. Because you are using your lab 8 repository, please make the your first commit message for lab 9 says “Lab 9 starts here.”

Be sure to ask any questions on Ed.

Compiler warnings and errors

Make sure your code compiles and passes clippy without errors or warnings. That is, running

$ cargo clean
$ cargo build
$ cargo clippy

should build your program without errors or warnings.

Formatting

Your code must be formatted by running cargo fmt.