Skip to content

Commit c168913

Browse files
committed
Refine exit command documentation to remove optional exit status details and clarify termination behavior
1 parent bc83efe commit c168913

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

stage_descriptions/base-04-pn5.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ In this stage, you'll implement the `exit` builtin.
44

55
The [`exit`](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#exit) builtin is a special command that terminates the shell.
66

7-
It takes an optional numeric argument as the shell's [exit status](https://en.wikipedia.org/wiki/Exit_status):
8-
```bash
9-
$ exit 0 # Exit with status 0 (success)
10-
$ exit 1 # Exit with status 1 (error)
11-
```
12-
13-
When your shell receives the `exit` command, it should terminate immediately with the specified exit code.
7+
When your shell receives the `exit` command, it should terminate immediately.
148

159
### Tests
1610

@@ -25,13 +19,7 @@ It will then send an invalid command to your shell, followed by the `exit` comma
2519
```bash
2620
$ invalid_command_1
2721
invalid_command_1: command not found
28-
$ exit 0
22+
$ exit
2923
```
3024

31-
The tester will verify that:
32-
- Your shell terminates after receiving the `exit` command
33-
- Your shell exits with status code `0`
34-
35-
### Notes
36-
37-
- The tester will always pass in `0` as the argument to the `exit` command.
25+
The tester will verify that your shell terminates after receiving the `exit` command.

0 commit comments

Comments
 (0)