Skip to content

Commit 51d415e

Browse files
author
Vladimir Kotal
committed
more spellchecking
1 parent deca147 commit 51d415e

File tree

8 files changed

+60
-58
lines changed

8 files changed

+60
-58
lines changed

common.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
\usepackage{multicol}
2222
\usepackage{tabularx}
2323

24+
\usepackage{nth}
25+
2426
%\input{seminar.bg2}
2527
%\usepackage{seminar}
2628

file-api.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
will learn about the \texttt{exec} calls on page \pageref{EXEC}.
610610
\item To fully understand how redirection works it is good to draw the file
611611
descriptor table for each step and where the slots point to. For example, for
612-
the 2nd example in the slide, we have the initial state, after \texttt{close(1)}
612+
the \nth{2} example in the slide, we have the initial state, after \texttt{close(1)}
613613
and \texttt{open("out", ...)}, and the final state, as follows:
614614

615615
\begin{verbatim}
@@ -622,7 +622,7 @@
622622
+-------+ +-------+ +-------+
623623
\end{verbatim}
624624

625-
\item You need to pay attention to the state of descriptors. The 2nd example
625+
\item You need to pay attention to the state of descriptors. The \nth{2} example
626626
will not work if the descriptor 0 is already closed, as
627627
\texttt{open} returns 0 (the first available descriptor) and \texttt{dup} fails
628628
while trying to duplicate an already closed descriptor. Possible

history.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
\sltitle{Books on UNIX history}
88
\begin{itemize}
99
\item Peter Salus: \emsl{A Quarter Century of UNIX}, Addison-Wesley;
10-
1st~edition (1994)
10+
\nth{1}~edition (1994)
1111
\item Libes D., Ressler, S.: \emsl{Life With Unix: A Guide for
1212
Everyone}, Prentice Hall (1989)
1313
\item \emsl{Open Sources: Voices from the Open Source Revolution},
@@ -52,7 +52,7 @@
5252
patronage (virtual memory, multiprocessors, \dots) till 1985.
5353
The last Multics installation worked in the Canadian Department of National
5454
Defense and the system was used actively for example during the Persian gulf
55-
war. Definitive shutdown was made 31st October 2000. More information can be
55+
war. Definitive shutdown was made \nth{31} October 2000. More information can be
5656
found on \url{http://www.multicians.org}.
5757
\item Before the work on the development environment for PDP-7 started, Thmopson
5858
wrote the \emph{Space Travel} program, that was developed in other environment

intro.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,14 @@
295295

296296
\begin{enumerate}
297297
\item Uresh Vahalia: \emsl{UNIX Internals: The New Frontiers}.
298-
Prentice Hall; 1st edition, 1995
298+
Prentice Hall; \nth{1} edition, 1995
299299
\item Bach, Maurice J.: \emsl{The Design of the UNIX Operating System}.
300300
Prentice Hall, 1986
301301
\item McKusick, M. K., Neville-Neil, G. V.: \emsl{The Design and
302302
Implementation of the FreeBSD Operating System}. Addison-Wesley, 2004
303303
%\item Goodheart, B.; Cox, J.: \emsl{The Magic Garden Explained: the
304304
%Internals of UNIX System~V Release 4}. Prentice Hall, 1994
305-
\item McDougall, R.; Mauro, J.: \emsl{Solaris Internals}. Prentice Hall; 2nd
305+
\item McDougall, R.; Mauro, J.: \emsl{Solaris Internals}. Prentice Hall; \nth{2}
306306
edition, 2006.
307307
\item \emsl{Linux Documentation Project}. \url{http://tldp.org/}
308308
\end{enumerate}
@@ -314,7 +314,7 @@
314314

315315
\begin{enumerate}
316316
\item A great book on Unix in general and compares SVR4.2, 4.4BSD, Solarix~2.x
317-
and Mach systems. The 2nd edition, scheduled for 2005, never happened,
317+
and Mach systems. The \nth{2} edition, scheduled for 2005, never happened,
318318
unfortunately.
319319
\item UNIX classic book. On UNIX System~V Rel.~2, and partially 3 as well.
320320
While outdated, it is one of the best books ever written on Unix. In 1993 a
@@ -335,14 +335,14 @@
335335
\sltitle{Books on Unix programming}
336336
\begin{enumerate}
337337
\item Stevens, W. R., Rago, S. A.: \emsl{Advanced Programming in UNIX(r)
338-
Environment}. Addison-Wesley, 2nd edition, 2005.
338+
Environment}. Addison-Wesley, \nth{2} edition, 2005.
339339
\item Rochkind, M. J.: \emsl{Advanced UNIX Programming},
340-
Addison-Wesley; 2nd edition, 2004
340+
Addison-Wesley; \nth{2} edition, 2004
341341
\item Stevens, W. R., Fenner B., Rudoff, A. M.: \emsl{UNIX Network
342342
Programming, Vol. 1 -- The Sockets Networking API}. Prentice Hall,
343-
3rd edition, 2004
343+
\nth{3} edition, 2004
344344
\item Butenhof, D. R.: \emsl{Programming with POSIX Threads},
345-
Addison-Wesley; 1st edition, 1997
345+
Addison-Wesley; \nth{1} edition, 1997
346346
% I don't why but after I switched from FreeBSD to Solaris, I can't typeset
347347
% word "unix" anymore. It's like it wasn't there. Using {} trick helps.
348348
\item UNIX specifications, see \url{http://www.unix.org}
@@ -368,7 +368,7 @@
368368
\item Detailed descriptions of system calls and functions.
369369
\item \label{POSIX4} A book that did not fit the slide and covers topics outside
370370
of the scope of this class: Gall\-meis\-ter, B. R.: \emsl{POSIX.4 Programmers
371-
Guide: Programming for the Real World}, O'Reilly; 1st edition, 1995. A great
371+
Guide: Programming for the Real World}, O'Reilly; \nth{1} edition, 1995. A great
372372
book on real-time POSIX extensions with a beautiful cover. See also pages
373373
\pageref{REALTIMEEXTENSIONS} a \pageref{SIGWAITINFO}.
374374
\item[\ldots] Go to Amazon and search for ``unix''. If you ever buy anything,
@@ -449,7 +449,7 @@
449449
standard came to existence as ANSI X3.159-1989 ``Programming Language C,'' and
450450
is mostly known as ``ANSI C'', or C89, and the command line name for the
451451
compiler itself was \texttt{c89}.
452-
\item The 2nd edition of the C book (1988) was updated for the upcoming
452+
\item The \nth{2} edition of the C book (1988) was updated for the upcoming
453453
standard as it used one of its final drafts. In 1990, ANSI C was adopted by ISO
454454
as ISO/IEC 9899:1990; that standard is sometimes called C90. It's the same as
455455
C89 but it renumbered its sections and removed the rationale document which was
@@ -1882,7 +1882,7 @@
18821882
\item Passing the environment in the third parameter of type
18831883
\texttt{char**} is not part of the normative part of the C standard, only the
18841884
informative one. C compilers typically support that though.
1885-
The \texttt{main} variant with the 3rd parameter looks like this:\\ \texttt{int
1885+
The \texttt{main} variant with the \nth{3} parameter looks like this:\\ \texttt{int
18861886
\funnm{main}(int \emph{argc}, char *\emph{argv}[], char *\emph{envp}[]);}
18871887
\item The return value type of \texttt{main} should be always \texttt{int}.
18881888
\emsl{Only lower 8 bits from that integer are only used though.} It is always a
@@ -1971,7 +1971,7 @@
19711971
convention. \texttt{wget} does not follow convention and uses
19721972
\texttt{http\_proxy} and \texttt{https\_proxy} as environment variables to set
19731973
the proxy to be used, and other lower case variables as well.
1974-
\item If \emph{envp} is the 3rd argument of \texttt{main}, it is the same pointer
1974+
\item If \emph{envp} is the \nth{3} argument of \texttt{main}, it is the same pointer
19751975
as is in the standard global variable \texttt{environ}.
19761976
\item Example: \example{main/print-env.c} (see below how to clear out inherited
19771977
environment from the shell using the \texttt{env} command):

proc.tex

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,8 @@
521521
\item runs a program defined via \emph{path}
522522
\item arguments that follow, including \emph{arg0}, are given to the program via
523523
\texttt{argc} and \texttt{argv} of its \texttt{main()}
524-
\item the argument list must end with \texttt{(char *)0}, ie. \texttt{NULL}
525-
\item \emph{arg0} should contain the program name (ie. not the full path)
524+
\item the argument list must end with \texttt{(char *)0}, i.e. \texttt{NULL}
525+
\item \emph{arg0} should contain the program name (i.e. not the full path)
526526
\item \emsl{open file descriptors are unaffected by \funnm{exec}}
527527
\begin{itemize}
528528
\item \dots{}aside from file descriptors with flag \texttt{FD\_CLOEXEC}
@@ -541,7 +541,7 @@
541541
is not important for the sake of a discussion.
542542
\item Sometimes \texttt{argv[0]} is different from the executable file name.
543543
For example, \texttt{login} command prefixes the shell file name with
544-
\texttt{'-'}, eg. \texttt{-bash}. The shell then knows it is supposed to
544+
\texttt{'-'}, e.g. \texttt{-bash}. The shell then knows it is supposed to
545545
function as a login shell. A login shell reads \texttt{/etc/profile}, for
546546
example.
547547
\item \funnm{exec} does not transfer the control to the program in memory
@@ -623,14 +623,14 @@
623623
\end{slide}
624624

625625
\begin{itemize}
626-
\item \emsl{l} = list (ie. list of arguments), \emsl{v} = vector (ie. an array
627-
of string pointers), \emsl{e}~=~environment (ie. environment variables are
626+
\item \emsl{l} = list (i.e. list of arguments), \emsl{v} = vector (i.e. an array
627+
of string pointers), \emsl{e}~=~environment (i.e. environment variables are
628628
passed to the function via an argument), \emsl{p} = \texttt{PATH} is used.
629629
\item Aside from \funnm{execlp} and \funnm{execvp}, it is always needed to use
630630
the full path to the executable program, either an absolute or relative one.
631631
\item All variants aside from \funnm{execle} and \funnm{execve}
632632
are also passing to the program being executed the environment variables of the
633-
calling process, ie. the \texttt{environ} array.
633+
calling process, i.e. the \texttt{environ} array.
634634
\item For some unknown historical reasons, there is no ``p'' with ``e'' together
635635
in the standard. However, GNU provides \funnm{execvpe} as an extension.
636636
\item \label{EXEC_DATE} Example: \example{exec/exec-date.c}
@@ -697,7 +697,7 @@
697697

698698
\begin{itemize}
699699
\item The UNIX standard does not specify what executable file format systems
700-
should use. While most of the UNIX and Unix-like systems (eg. Linux
700+
should use. While most of the UNIX and Unix-like systems (e.g. Linux
701701
distributions) use ELF, there are other widely used systems that do not. One
702702
example is macOS (which is a certified UNIX system) that uses the \emph{Mach-O}
703703
file format, short for \emph{Mach Object}. Each Mach-O file is made
@@ -850,9 +850,9 @@
850850
\item producer blocks on writing if the pipe is full
851851
\item consumer blocks on reading if the pipe is empty
852852
\end{itemize}
853-
\item consumer gets EOF (ie. \texttt{read()} returns
853+
\item consumer gets EOF (i.e. \texttt{read()} returns
854854
\texttt{0}) only if all copies of \texttt{fildes[1]} are closed.
855-
\item named pipe (ie. fifo, see \funnm{mkfifo}) works the same way. The
855+
\item named pipe (i.e. fifo, see \funnm{mkfifo}) works the same way. The
856856
difference is any process can use it.
857857
\end{itemize}
858858
\end{slide}
@@ -866,7 +866,7 @@
866866
u{}nix-domain socket. However, such a workaround is out of scope for this
867867
class.
868868
\item If the function \funnm{write} writes at most \texttt{PIPE\_BUF} bytes to
869-
the pipe, it is guaranteed that the write will be atomic, ie. such bytes will
869+
the pipe, it is guaranteed that the write will be atomic, i.e. such bytes will
870870
not be intermingled with bytes written by other producers.
871871
\item \label{TWO_WAY_PIPES} The SUSv3 standard does not specify whether
872872
\texttt{fildes[0]} is also open for writing and if \texttt{fildes[1]} is also
@@ -908,13 +908,13 @@
908908
\funnm{pipe}, we have to call \texttt{dup2(pd[1], 1)} in the producer as
909909
otherwise \texttt{dup(pd[1])} could reuse the file descriptor \texttt{0} in
910910
place of expected \texttt{1}. You might also need to check if \verb#pd[1] == 1#
911-
(ie. standard output was closed before calling \funnm{pipe}) as in that case we
911+
(i.e. standard output was closed before calling \funnm{pipe}) as in that case we
912912
could actually close one end of the pipe. Similarly, in the consumer you might
913913
need to check if \verb#pd[0] == 0#.
914914
\item It is better to create a pipe from a child to its parent as typically the
915915
process writing the pipe finishes first, then the consumer reads the rest of the
916916
data, processes it, and then finally exits. Remember, the shell waits for the
917-
program it started, ie. the parent, and it does not care at all about children
917+
program it started, i.e. the parent, and it does not care at all about children
918918
the running program spawned during its life. If the pipe was created the other
919919
way around, the shell could print the prompt after the parent finished while the
920920
data from the child might still be flowing to the console.
@@ -924,7 +924,7 @@
924924
was formed. Ie. the first command in the pipeline was created as the last
925925
process.
926926
\item However, in \texttt{bash}, all processes in a pipeline are direct children
927-
of the shell itself, ie. \texttt{bash} calls \funnm{fork} that many times as is
927+
of the shell itself, i.e. \texttt{bash} calls \funnm{fork} that many times as is
928928
the number of programs in the pipeline. Before the prompt is printed, it waits
929929
for all processes it directly created to finish.
930930
\end{itemize}
@@ -1211,7 +1211,7 @@
12111211
For \funnm{dlopen}, the default is \texttt{RTLD\_LOCAL}. It means you can
12121212
map the same library multiple time via \funnm{dlopen} and the symbols in the
12131213
mapped instances of the same library will not overlap. However, all
1214-
globally mapped symbols from there are shared, eg. \texttt{errno}.
1214+
globally mapped symbols from there are shared, e.g. \texttt{errno}.
12151215
\end{itemize}
12161216
\item \label{RTLD_NEXT} Special handle \texttt{RTLD\_NEXT} searches the symbol
12171217
only in libraries loaded after the library that called \funnm{dlsym}. Handy for

synchro.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,15 @@
308308
\item to set locks for file \texttt{fildes}:
309309
\texttt{cmd}:
310310
\begin{itemize}
311-
\item \texttt{F\_GETLK} \dots{} takes lock description from 3rd argument
311+
\item \texttt{F\_GETLK} \dots{} takes lock description from \nth{3} argument
312312
and replaces it with description of existing lock that collides with it.
313-
\item \texttt{F\_SETLK} \dots{} sets or destroys lock described by the 3rd
313+
\item \texttt{F\_SETLK} \dots{} sets or destroys lock described by the \nth{3}
314314
argument. If the lock cannot be set immediately returns $-1$.
315315
\item \texttt{F\_SETLKW} \dots{} like \texttt{F\_SETLK}, however puts
316316
the process to sleep if it is not possible to set the lock
317317
(\texttt{W} means ``wait'')
318318
\end{itemize}
319-
\item 3rd argument contains lock description and is pointer to
319+
\item \nth{3} argument contains lock description and is pointer to
320320
\texttt{struct flock}
321321
\end{itemize}
322322
\end{slide}

0 commit comments

Comments
 (0)