valgrind and stdout redirects

Stefan (metze) Metzmacher metze at samba.org
Wed Mar 17 06:51:15 MDT 2010


Andreas Schneider schrieb:
> Hi Jeremy,
> 
> I've tried to get debug level 10 output in make selftest the last two days to 
> fix a bug in my spoolss code.
> 
> The strange thing was that I didn't get any logging output and others did. I 
> tracked it down to ec4ed45563f9d8e25fcfd88840944a90b3139c3e which adds
> 
> #ifndef VALGRIND
> 
> to close_low_fds() in lib/util/become_daemon.c
> 
> This means that if you have the valgrind-devel package installed and compile 
> with developer mode, stdout isn't closed.
> 
> I you don't have valgrind-devel install 'make selftest' doesn't log anything 
> after it is became a daemon.
> 
> If your remove the -S option from the smbd you get logfiles in in st/dc/logs. 
> Which is what I want, but probably not what you want on the build farm.
> 
> However the current state is broken in either way. So how should this be 
> fixed? Metze told me I should ask you.

Jeremy, I think we should never change the behavior depending on
#ifdef VALGRIND or DEVELOPER, I also wasted to much time debugging such
things... Would it be ok for you if we remove this and other #ifdef's?

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100317/a54e5e6d/attachment.pgp>


More information about the samba-technical mailing list