4820 p1 milestone 2 memory check

4820 p1 milestone 2 memory check

You cannot submit for this problem because the homework's deadline is due.

Milestone 2

Memory leaks and undefined behaviors are tested here but not counted into grade.

Hint: LeakSanitizer is unstable. You may ignore the cases when it meets fatal error.

Tasks

6. Pipes: [5+5+5+10]

6.1 Basic pipe support (e.g. echo 123 | grep 1); [5]

  • Case: 1-2

6.2 Run all ‘stages’ of piped process in parallel. (e.g. yes ve482 | grep 482); [5]

  • Case: 3-4
  • Your shell is likely to get TLE (Time Limit Exceeded) if not running in parallel.

7. Support CTRL-D (similar to bash, when there is no/an unfinished command); [5]

  • Case: 5-6

8. Internal commands: [5+5+5]

8.1. Implement pwd as a built-in command; [5]

  • Case: 7

8.2 Allow changing working directory using cd; [5]

  • Case: 8

8.3. Allow pwd to be piped or redirected as specified in requirement 4.; [5]

  • Case: 9-10
  • eg. pwd > 1.txt

9. Support CTRL-C: [5+3+2+10]

  • Your shell is likely to get TLE (Time Limit Exceeded) if CTRL-C is not handled correctly.
  • You should NOT use kill(0, signal), it may destroy the judger. You will be sent to the honor council if you intentionally use it.

9.1. Properly handle CTRL-C in the case of requirement 4.; [5]

  • Case: 11

9.3. Extend 9.2 to support requirement 7., especially on an incomplete input; [2]

  • Case: 12

4820 p1 milestone 2

Not Claimed
Status
Finished
Problems
4
Open Since
2022-09-19 00:00
DDL
2022-10-10 23:59
Extension
0.0 hour(s)