[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#281815: glibc: Please change cryptic error message: "Servname not supported for ai_socktype"

On Tue, 30 Nov 2004, GOTO Masanori wrote:
> At Wed, 17 Nov 2004 21:20:09 -0200,
> Henrique de Moraes Holschuh wrote:
> > It is nearly impossible for an user to understand what the hell "Servname
> > not supported for ai_socktype" means.  Please at least change that to
> > "Socket service name unknown", or something else that makes sense to someone
> > who DOES NOT write Unix socket code...
> I don't think it's big difference between the original message and
> your proposed one.  Note that at least FreeBSD and Solaris8 uses your

There is a quite big one, Goto-san.  "Servname" is not defined anywhere, it
does not exist as a word, it is not on the top of a comment in
"/etc/services", and it is not documented in services(5) either. It is not
documented even in any of the getserv* manpages.

"Service name" is at least something that can be understood by someone that
knows what a "service" is. And the fact that there is a 'services' database
in nsswitch.conf and there is an /etc/services file, and that apropos
services gives an useful pointer to services(5) makes a LOT of difference.

IMHO a very good error message would be something like:
"Service name %s not in the system socket service name database".  

But this is probably not doable, so we would have to go with something less
helpful, but still easy to understand, like:
"Service name is unknown to the system socket service name database".

Text about "ai_socktype" in a user-visible error message is completely,
utterly useless for anyone that does not do Unix socket programming.  And
"Servname" is something that we can only infer to mean something if we already
have a damn good idea of what the error message could be talking about in
the first place...

> Closed.  But if you have another opinion, and that makes really sense,
> I would reconsider it.  In that case, please discuss it with us.

Well, I have explained my POV better, now. And I gave an example of a good
message that is very different from the original one.

Please reconsider changing this error message, there is no reason to keep an
obscure error message THIS obscure. Especially when people hit the problem
quite often.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: