X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=process.tex;h=819401334288d84c8dc598d2fcdc5468a244667b;hp=9e71df19263403dfec12281e20d0a958cb6a41a6;hb=33a54e1bfa5e62cb90d84c2d5f2d0c53864f6bec;hpb=b81723c64c1d63b89cd3cec12f2fcccc4a756967 diff --git a/process.tex b/process.tex index 9e71df1..8194013 100644 --- a/process.tex +++ b/process.tex @@ -1,6 +1,6 @@ %% 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", @@ -861,7 +861,7 @@ il suo prototipo \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 @@ -1270,7 +1270,34 @@ cui si effettua la scansione. \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} @@ -1419,7 +1446,34 @@ pi 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}