Wandering Thoughts archives

2005-09-12

Things not do for your network daemon's debugging option

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.)

BadDaemonDebugging written at 16:49:29; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.