sscanf always generates error condition
Geraldo Veiga
ilan343 at violet.berkeley.edu
Sat May 4 06:28:51 AEST 1991
In article <1991May3.095541.21439 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:
> There are quite a few system calls in the kernel that set errno to a value,
>then try the operation which would cause that error value if it failed, and
>then return immediately it it fails, signalling an error. They're allowed to
>do that.
>
This seems to be the final word on this question. From now on I'll have
two separate error handling routines:
syserr(message) invoked only when a system call returns an
error condition. This function prints "message", calls perror()
and exits.
usrerr(message) invoked for non-system errors, same as above without
the call to perror().
Thanks for everybody's help.
More information about the Comp.unix.programmer
mailing list