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

Re: [Nbd] The purpose of dontfork in handle_connection()?



On Tue, Mar 12, 2013 at 08:57:54AM +0100, Wouter Verhelst wrote:
> 
> The debugging output currently doesn't distinguish between client
> sessions (it probably should), which means that if we fork with
> debugging output, it's pretty difficult to make sense of the output.
> 
> It's probably a good idea to change that, yes.
> 

Ah I see, I might try to fix that too then.

What do you think about DEBUG(), could we just use msg(LOG_DEBUG, ...)
instead?

And what about fprintf(stderr, ..), replace them all with
msg(LOG_DEBUG, ...), right?

It would be cleaner if there was only one way to log messages, namely
msg(). Then it would be just a matter of the configuration where the
output would finally land, syslog or stderr.

> > ( If someone wonders why I stumbled across this one: I'll try to move
> > the whole negotiation procedure to the child process, and cleanup the
> > server code alongside. )
> 
> I've long longed for a set of fresh eyes over the code, much like you're
> doing now. Cleaning up your own code is something that's surprisingly
> difficult if you have to do it all by yourself. In that light, your
> efforts are much appreciated. Thanks!

No problem, I personally love fixing things, also on my freetime.

And my employer, Opinsys, is highly devoted to free software and
giving back to community. We are running LTSP-systems and NBD plays a
central role there.

Luckily, free software and its communities make this kind of things
possible.

Thank you for doing good job as the maintainer. You are really quick
at reviewing patches, accepting good ones and perhaps most importantly
giving feedback on ones which look suspicious. Thanks!

-- 
Tuomas



Reply to: