Things not do for your network daemon's debugging option

September 12, 2005

It's always nice when people build debugging support into their network daemon. However, I have a modest suggestion:

When your daemon is designed to be run under inetd / xinetd, writing debugging output to standard error is a bad plan.

(You win bonus points for also logging it to syslog, so that an innocent person might be deluded into thinking that it's only going via syslog.)

Because, you see, all that nice debugging output is going to go flying straight off to the clients talking to the daemon. And it's unlikely to look like the valid protocol output that the clients expect. Which is likely to lead to all sorts of peculiar things happening.

Debugging mysteriously failing network daemons is hard enough without throwing even more disruptions in to clutter up the picture. So, authors of network daemons, please don't. And if you do, please document it prominently.

(And if you ever have to debug the authd daemon in Fedora Core, remember this.)

Written on 12 September 2005.
« The annoyance of arbitrary limits
The problem of being overcautious »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Sep 12 16:49:29 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.