Subject: Re: err(3) and error handling
To: Ian Fitchet <>
From: Sergio de Souza Prallon <>
List: current-users
Date: 02/06/1995 21:59:16
>  However, what about a string (or number of strings) analogous to
> errno?  If a system call fails the system call can set errstr to point
> to a more descriptive reason why.  What I was thinking was that each
> layer on the way back out could then (ap|pre)pend more information.
> That could get messy (and involve lots of alloc'ing) hence an array of
> descriptive strings, say, up to ten (of pointers to static strings?).
>  There again, perhaps it's not such a good idea.
Perhaps a possible solution in the userland could be to make a two-dimensional
matrix (in fact, an array of pointers to functions) mapping 
(syscall or libfunction, errno) --> "More descriptive msg".
That can be done by anyone who cares as a replacement err(3) or perror(3) and
can be made public avaiable without boring the core team. The obvious spot in
this strategy is that there is no easy way to deal with programs that use
sys_errlist directly.


Sergio de Souza Prallon		 | e-mail:
Departamento de Fisica		 | HOME: +55 21 264-3603
Pontificia Universidade Catolica | # include	<stddisclaim.h>
Rio de Janeiro - Brasil		 | # include	<sysadmlib.h>