Skip to content

Commit f8c1de8

Browse files
author
Vladimir Kotal
committed
on handling errors
1 parent 6a3a99a commit f8c1de8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/class-assignments/extra-feedback.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ Do not blindly accept potentially unlimited user input. It probably does not
1212
make sense for command line to be millions of characters long.
1313

1414
--------------------------------------------------------------------------------
15-
Check return values (and react on them !) of any call that can fail.
15+
Check return values of any call that can fail.
1616

1717
Yes, malloc() can fail too.
1818

19+
Reacting on failures needs to be sensitive, though. Exiting the shell
20+
when malloc() fails is safe thing to do. On the other hand, failing to read a
21+
file in interactive mode should not tear down the shell.
22+
1923
--------------------------------------------------------------------------------
2024
The shell should not assume it is being run from another shell.
2125

0 commit comments

Comments
 (0)