%% process.tex
%%
-%% Copyright (C) 2000-2010 Simone Piccardi. Permission is granted to
+%% Copyright (C) 2000-2011 Simone Piccardi. Permission is granted to
%% copy, distribute and/or modify this document under the terms of the GNU Free
%% Documentation License, Version 1.1 or any later version published by the
%% Free Software Foundation; with the Invariant Sections being "Un preambolo",
\bodydesc{La funzione ritorna 0 in caso di successo e $-1$ in caso di
errore, nel qual caso \var{errno} assumerà uno dei valori seguenti:
\begin{errlist}
- \item[\errcode{ENOMEM}] o \param{addr} + \param{lenght} eccede la dimensione
+ \item[\errcode{ENOMEM}] o \param{addr} + \param{length} eccede la dimensione
della memoria usata dal processo o l'intervallo di indirizzi specificato
non è mappato.
\item[\errcode{EINVAL}] \param{addr} non è un multiplo delle dimensioni di
\begin{figure}[htb]
\centering
- \includegraphics[width=13cm]{img/argv_argc}
+% \includegraphics[width=13cm]{img/argv_argc}
+% \includegraphics[width=13cm]{img/argv_argc}
+ \begin{tikzpicture}[>=stealth]
+ \draw (0.5,2.5) rectangle (3.5,3);
+ \draw (2,2.75) node {\texttt{argc = 5}};
+ \draw (5,2.5) rectangle (8,3);
+ \draw (6.5,2.75) node {\texttt{argv[0]}};
+ \draw [->] (8,2.75) -- (9,2.75);
+ \draw (9,2.75) node [anchor=west] {\texttt{"touch"}};
+ \draw (5,2) rectangle (8,2.5);
+ \draw (6.5,2.25) node {\texttt{argv[1]}};
+ \draw [->] (8,2.25) -- (9,2.25);
+ \draw (9,2.25) node [anchor=west] {\texttt{"-r"}};
+ \draw (5,1.5) rectangle (8,2);
+ \draw (6.5,1.75) node {\texttt{argv[2]}};
+ \draw [->] (8,1.75) -- (9,1.75);
+ \draw (9,1.75) node [anchor=west] {\texttt{"riferimento.txt"}};
+ \draw (5,1.0) rectangle (8,1.5);
+ \draw (6.5,1.25) node {\texttt{argv[3]}};
+ \draw [->] (8,1.25) -- (9,1.25);
+ \draw (9,1.25) node [anchor=west] {\texttt{"-m"}};
+ \draw (5,0.5) rectangle (8,1.0);
+ \draw (6.5,0.75) node {\texttt{argv[4]}};
+ \draw [->] (8,0.75) -- (9,0.75);
+ \draw (9,0.75) node [anchor=west] {\texttt{"questofile.txt"}};
+ \draw (4.25,3.5) node{\texttt{"touch -r riferimento.txt -m questofile.txt"}};
+
+ \end{tikzpicture}
\caption{Esempio dei valori di \param{argv} e \param{argc} generati nella
scansione di una riga di comando.}
\label{fig:proc_argv_argc}
fig.~\ref{fig:proc_envirno_list}.
\begin{figure}[htb]
\centering
- \includegraphics[width=15 cm]{img/environ_var}
+% \includegraphics[width=15 cm]{img/environ_var}
+ \begin{tikzpicture}[>=stealth]
+ \draw (2,3.5) node {\textsf{Environment pointer}};
+ \draw (6,3.5) node {\textsf{Environment list}};
+ \draw (10.5,3.5) node {\textsf{Environment string}};
+ \draw (0.5,2.5) rectangle (3.5,3);
+ \draw (2,2.75) node {\texttt{environ}};
+ \draw [->] (3.5,2.75) -- (4.5,2.75);
+ \draw (4.5,2.5) rectangle (7.5,3);
+ \draw (6,2.75) node {\texttt{environ[0]}};
+ \draw (4.5,2) rectangle (7.5,2.5);
+ \draw (6,2.25) node {\texttt{environ[1]}};
+ \draw (4.5,1.5) rectangle (7.5,2);
+ \draw (4.5,1) rectangle (7.5,1.5);
+ \draw (4.5,0.5) rectangle (7.5,1);
+ \draw (4.5,0) rectangle (7.5,0.5);
+ \draw (6,0.25) node {\texttt{NULL}};
+ \draw [->] (7.5,2.75) -- (8.5,2.75);
+ \draw (8.5,2.75) node[right] {\texttt{HOME=/home/piccardi}};
+ \draw [->] (7.5,2.25) -- (8.5,2.25);
+ \draw (8.5,2.25) node[right] {\texttt{PATH=:/bin:/usr/bin}};
+ \draw [->] (7.5,1.75) -- (8.5,1.75);
+ \draw (8.5,1.75) node[right] {\texttt{SHELL=/bin/bash}};
+ \draw [->] (7.5,1.25) -- (8.5,1.25);
+ \draw (8.5,1.25) node[right] {\texttt{EDITOR=emacs}};
+ \draw [->] (7.5,0.75) -- (8.5,0.75);
+ \draw (8.5,0.75) node[right] {\texttt{OSTYPE=linux-gnu}};
+ \end{tikzpicture}
\caption{Esempio di lista delle variabili di ambiente.}
\label{fig:proc_envirno_list}
\end{figure}