Re: errno=104

[prev] [thread] [next] [lurker] [Date index for 2006/08/26]

From: Yossi Kreinin
Subject: Re: errno=104
Date: 18:08 on 26 Aug 2006
Dominic Mitchell wrote:
> 
> Your're spot on about the message though, as there is a lovely
> strerror(3) function for turning those error codes into nice human
> readable strings.  You don't have to be a genius to find it.
> 
> -Dom
> 

strerror/perror/herror/whatever are surely a great family of functions since:

1. "Is a directory", contrary to 54 (or whatever), is awfully informative (especially if you have exactly one directory)
2. I think these messages are pretty much the only thing actually affected by "locales" (the only effect of choosing Japanese as the "session language" seems to be the Japanese perror messages)

One awesome application doing lots of file I/O is BitKeeper (installed suid root, so you can screw up others' "revision-controlled" files, occasionally asking a sysadm to unscrew them back). BitKeeper is very careful to report all errors, such as "error plocking file: not owner". To find out WHICH 
file, I usually use strace (and boy does it mess with A LOT of files for doing just about ANYTHING). I wonder how is it possible to strace a suid root process, and what creative uses exist for that?

I once looked at some Windows CE guts-related sources. You have this huge networking module, reporting errors as integeres (what else?). Then it's wrapped by a thin layer of shite, which checks for errors and returns a SINGLE integer (what else?) indicating that networking code failed, and throws 
the more specific integer away. So there's this useless tree of error numbers, eventually culminating in a boolean "tough luck!" message to the user.

-- Yossi



There's stuff above here

Generated at 03:01 on 31 Aug 2006 by mariachi 0.52