Skip to content

Commit d85186c

Browse files
committed
move the example where it belongs
1 parent 8191de3 commit d85186c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intro.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,12 +1930,12 @@
19301930
\texttt{exit(-1)}. Based on the information in the previous paragraph,
19311931
from \texttt{-1} you will get \texttt{255} as the return value you get in the
19321932
shell in \texttt{\$?}. It just creates confusion.
1933+
Example: \example{main/return-negative-1.c}.
19331934
\item It is very reasonable to use only \texttt{EXIT\_SUCCESS} (\texttt{0}) and
19341935
\texttt{EXIT\_FAILURE} (\texttt{1}) unless there is a valid reason for other
19351936
values. Sometimes you might need more values to distinguish between failures.
19361937
For example, the \texttt{passwd} command on Solaris have quite a few of them, go
1937-
check its manual page if interested, section \texttt{EXIT STATUS}. Example:
1938-
\example{main/return-negative-1.c}.
1938+
check its manual page if interested, section \texttt{EXIT STATUS}.
19391939
\item The difference between function \texttt{exit()} and \verb#_exit()# is that
19401940
\texttt{exit} also flushes and closes streams (try it out with \texttt{printf()}
19411941
\emsl{without} printing a new line), and calls functions registered via

0 commit comments

Comments
 (0)