Sistemate cross-reference dei processi.
[gapil.git] / errors.tex
1 \chapter{I codici di errore}
2 \label{cha:errors}
3
4 Si riportano in questa appendice tutti i codici di errore. Essi sono
5 accessibili attraverso l'inclusione del file di header \file{errno.h}, che
6 definisce anche la variabile globale \var{errno}. Per ogni errore definito
7 riporteremo la stringa stampata da \func{perror} ed una breve spiegazione. Si
8 tenga presente che spiegazioni più particolareggiate, qualora necessarie per
9 il caso specifico, possono essere trovate nella descrizione del prototipo
10 della funzione.
11
12 I codici di errore sono riportati come costanti di tipo \type{int}, i valori
13 delle costanti sono definiti da macro di preprocessore nel file citato, e
14 possono variare da architettura a architettura; è pertanto necessario
15 riferirsi ad essi tramite i nomi simbolici. Le funzioni \func{perror} e
16 \func{strerror} (vedi \secref{sec:intro_strerror}) possono essere usate per
17 ottene dei messaggi di errore.
18
19
20 \section{Gli errori dei file}
21 \label{sec:err_file_errors}
22
23 In questa sezione riassumeremo gli errori restituiti dalle funzioni di
24 libreria che operano sui file.
25
26 \begin{description}
27   
28 \item \macro{EPERM} \textit{Operation not permitted}. L'operazione non è
29   permessa: solo il proprietario del file o un processo con sufficienti
30   privilegi può eseguire l'operazione.
31 \item \macro{ENOENT} \textit{No such file or directory}. Il file indicato dal
32   pathname non esiste: o una delle componenti non esiste o il pathname
33   contiene un link simbolico spezzato.
34 \item \macro{EIO} \textit{Input/output error}. Errore di input/output: usato
35   per riportare errori hardware in lettura/scrittura (su un dispositivo).
36 \item \macro{ENXIO} \textit{No such device or address}. Device inesistente: il
37   sistema ha tentato di usare un dispositivo attraverso il file specificato,
38   ma non lo ha trovato. Può significare che il file di dispositivo non è
39   corretto, che il modulo relativo non è stato caricato nel kernel, o che il
40   dispositico è fisicamente assente o non funzionante.
41 \item \macro{ENOEXEC} \textit{Invalid executable file format}. Il file non ha
42   un formato eseguibile, è un errore riscontrato dalle funzioni \func{exec}.
43 \item \macro{EBADF} \textit{Bad file descriptor}. File descriptor non valido:
44   si è usato un file descriptor inesistente, o aperto in sola lettura per
45   scrivere, o viceversa.
46 \item \macro{ENOMEM} \textit{No memory available}. Il kernel non è in grado di
47   allocare ulteriore memoria per completare l'operazione richiesta.
48   
49 \item \macro{EACCESS} \textit{Permission denied}. Permesso negato: l'accesso
50   al file non è consentito: i permessi del file o della directory non
51   consentono l'operazione.
52
53
54 \item \macro{EXDEV} \textit{Cross-device link}. 
55 \item \macro{ENOTBLK} \textit{}. 
56 \item \macro{EBUSY} \textit{Resource busy}. 
57 \item \macro{EEXIST} \textit{File exists}. 
58 \item \macro{ENODEV} \textit{No such device}. 
59 \item \macro{ENOTDIR} \textit{Not a directory}.  un componente del pathname non è una directory.
60
61 \item \macro{EISDIR} \textit{Is a directory}. 
62 \item \macro{EINVAL} \textit{Invalid argument}. 
63 \item \macro{EMFILE} \textit{Too many open files}. 
64 \item \macro{ENFILE} \textit{File table overflow}. 
65 \item \macro{ENOTTY} \textit{Not a terminal}. 
66 \item \macro{ETXTBSY} \textit{}. 
67 \item \macro{EFBIG} \textit{File too big}. 
68
69 \item \macro{ENOSPC} \textit{No space left on device}. la directory in cui si
70   vuole creare il link non ha spazio per ulteriori voci.
71
72 \item \macro{ESPIPE} \textit{Invalid seek operation}. 
73 \item \macro{EROFS} \textit{}.  il file risiede su un filesystem read-only.
74   
75 \item \macro{EMLINK} \textit{Too many links}. Ci sono troppi link al file (il
76   numero massimo è specificato dalla variabile \macro{LINK\_MAX}, vedi
77   \secref{sec:xxx_limits}).
78
79 \item \macro{EPIPE} \textit{Broken pipe}. 
80 \item \macro{EDOM} \textit{Domain error}. 
81 \item \macro{ERANGE} \textit{Range error}. 
82 \item \macro{EAGAIN} \textit{Resource temporarily unavailable}. 
83 \item \macro{EWOULDBLOCK} \textit{}. 
84 \item \macro{EINPROGRESS} \textit{}. 
85 \item \macro{EALREADY} \textit{}. 
86 \item \macro{ENOTSOCK} \textit{}. 
87 \item \macro{EMSGSIZE} \textit{}. 
88 \item \macro{EALREADY} \textit{}. 
89 \item \macro{ENOTSOCK} \textit{}. 
90 \item \macro{EMSGSIZE} \textit{}. 
91 \item \macro{EPROTOTYPE} \textit{}. 
92 \item \macro{ENOPROTOOPT} \textit{}. 
93 \item \macro{EPROTONOSUPPORT} \textit{}. 
94 \item \macro{ESOCKTNOSUPPORT} \textit{}. 
95 \item \macro{EOPNOTSUPP} \textit{}. 
96 \item \macro{EPFNOSUPPORT} \textit{}. 
97 \item \macro{EAFNOSUPPORT} \textit{}. 
98 \item \macro{EADDRINUSE} \textit{}. 
99 \item \macro{EADDRNOTAVAIL} \textit{}. 
100 \item \macro{ENETDOWN} \textit{}. 
101 \item \macro{ENETUNREACH} \textit{}. 
102 \item \macro{ENETRESET} \textit{}. 
103 \item \macro{ECONNABORTED} \textit{}. 
104 \item \macro{ECONNRESET} \textit{}. 
105 \item \macro{ENOBUFS} \textit{}. 
106 \item \macro{EISCONN} \textit{}. 
107 \item \macro{ENOTCONN} \textit{}. 
108 \item \macro{EDESTADDRREQ} \textit{}. 
109 \item \macro{ESHUTDOWN} \textit{}. 
110 \item \macro{ETOOMANYREFS} \textit{}. 
111 \item \macro{ETIMEDOUT} \textit{}. 
112 \item \macro{ECONNREFUSED} \textit{}. 
113
114 \item \macro{ELOOP} ci sono troppi link simbolici nella risoluzione di un
115   pathname.
116
117 \item \macro{ENAMETOOLONG} si è indicato un pathname troppo lungo.
118
119 \item \macro{EHOSTDOWN} \textit{}. 
120 \item \macro{EHOSTUNREACH} \textit{}. 
121 \item \macro{ENOTEMPTY} \textit{}. 
122 \item \macro{EPROCLIM} \textit{}. 
123 \item \macro{EUSERS} \textit{}. 
124 \item \macro{EDQUOT} \textit{}. 
125 \item \macro{ESTALE} \textit{}. 
126 \item \macro{EREMOTE} \textit{}. 
127 \item \macro{EBADRPC} \textit{}. 
128 \item \macro{ERPCMISMATCH} \textit{}. 
129 \item \macro{EPROGUNAVAIL} \textit{}. 
130 \item \macro{EPROGMISMATCH} \textit{}. 
131 \item \macro{EPROCUNAVAIL} \textit{}. 
132 \item \macro{ENOLCK} \textit{No locks available}. 
133 \item \macro{EFTYPE} \textit{Inappropriate file type or format}. 
134 \item \macro{EAUTH} \textit{}. 
135 \item \macro{ENEEDAUTH} \textit{}. 
136 \item \macro{ENOSYS} \textit{Function not implemented}. 
137 \item \macro{ENOTSUP} \textit{Not supported}. 
138 \item \macro{EILSEQ} \textit{}. 
139 \item \macro{EBACKGROUND} \textit{}. 
140 \item \macro{EDIED} \textit{}. 
141 \item \macro{ED} \textit{}. 
142 \item \macro{EGREGIOUS} \textit{}. 
143 \item \macro{EIEIO} \textit{}. 
144 \item \macro{EGRATUITOUS} \textit{}. 
145 \item \macro{EBADMSG} \textit{}. 
146 \item \macro{EIDRM} \textit{}. 
147 \item \macro{EMULTIHOP} \textit{}. 
148 \item \macro{ENODATA} \textit{}. 
149 \item \macro{ENOLINK} \textit{}. 
150 \item \macro{ENOMSG} \textit{}. 
151 \item \macro{ENOSR} \textit{}. 
152 \item \macro{ENOSTR} \textit{}. 
153 \item \macro{EOVERFLOW} \textit{}. 
154 \item \macro{EPROTO} \textit{}. 
155 \item \macro{ETIME} \textit{}. 
156
157
158 \section{Errori del kernel}
159 \label{sec:err_kernel_err}
160
161
162 \item \macro{ERESTART} \textit{}. 
163 \item \macro{ECHRNG} \textit{}. 
164 \item \macro{EL2NSYNC} \textit{}. 
165 \item \macro{EL3HLT} \textit{}. 
166 \item \macro{EL3RST} \textit{}. 
167 \item \macro{ELNRNG} \textit{}. 
168 \item \macro{EUNATCH} \textit{}. 
169 \item \macro{ENOCSI} \textit{}. 
170 \item \macro{EL2HLT} \textit{}. 
171 \item \macro{EBADE} \textit{}. 
172 \item \macro{EBADR} \textit{}. 
173 \item \macro{EXFULL} \textit{}. 
174 \item \macro{ENOANO} \textit{}. 
175 \item \macro{EBADRQC} \textit{}. 
176 \item \macro{EBADSLT} \textit{}. 
177 \item \macro{EDEADLOCK} \textit{}. 
178 \item \macro{EBFONT} \textit{}. 
179 \item \macro{ENONET} \textit{}. 
180 \item \macro{ENOPKG} \textit{}. 
181 \item \macro{EADV} \textit{}. 
182 \item \macro{ESRMNT} \textit{}. 
183 \item \macro{ECOMM} \textit{}. 
184 \item \macro{EDOTDOT} \textit{}. 
185 \item \macro{ENOTUNIQ} \textit{}. 
186 \item \macro{EBADFD} \textit{}. 
187 \item \macro{EREMCHG} \textit{}. 
188 \item \macro{ELIBACC} \textit{}. 
189 \item \macro{ELIBBAD} \textit{}. 
190 \item \macro{ELIBSCN} \textit{}. 
191 \item \macro{ELIBMAX} \textit{}. 
192 \item \macro{ELIBEXEC} \textit{}. 
193 \item \macro{ESTRPIPE} \textit{}. 
194 \item \macro{EUCLEAN} \textit{}. 
195 \item \macro{ENAVAIL} \textit{}. 
196 \item \macro{EISNAM} \textit{}. 
197 \item \macro{EREMOTEIO} \textit{}. 
198 \item \macro{ENOMEDIUM} \textit{}. 
199 \item \macro{EMEDIUMTYPE} \textit{}. 
200 \item \macro{} \textit{}. 
201 \item \macro{} \textit{}. 
202 \item \macro{} \textit{}. 
203 \item \macro{} \textit{}. 
204 \item \macro{} \textit{}. 
205 \item \macro{} \textit{}. 
206
207
208 \end{description}
209
210 \section{Gli errori dei processi}
211 \label{sec:err_proc_errors}
212
213 In questa sezione riassumeremo gli errori restituiti dalle funzioni di
214 libreria che operano sui processi.
215
216 \begin{description}
217
218 \item \macro{ESRCH} \textit{No process matches the specified process ID}. Non
219   esiste un processo con il \acr{pid} specificato.
220 \item \macro{EINTR} \textit{Interrupted function call}. Una funzione di
221   libreria è stata interrotta. In genere questo avviene causa di un segnale
222   asincrono al processo che impedisce la conclusione della chiamata. In questo
223   caso è necessario ripetere la chiamata alla funzione. 
224 \item \macro{E2BIG} \textit{Argument list too long}. Lista degli argomenti
225   troppo lunga: è una condizione prevista da POSIX quando la lista degli
226   argomenti passata ad una delle funzioni \func{exec} occupa troppa memoria,
227   non può mai accadere in GNU/Linux.
228 \item \macro{ECHILD} \textit{There are no child processes}. Non esiste un
229   processo figlio. Viene rilevato dalle funzioni per la gestione dei processi
230   figli. 
231 \item \macro{EDEADLK} \textit{Deadlock avoided}. L'allocazione di una risorsa
232   avrebbe causato un deadlock. Non sempre il sistema è in grado di riconoscere
233   queste situazioni, nel qual caso si avrebbe in blocco. 
234 \item \macro{EFAULT} \textit{Bad address} una stringa passata come parametro è
235   fuori dello spazio di indirizzi del processo, in genere questa situazione
236   provova.
237
238
239 \end{description}
240
241