[Samba] Why are some error messages printed to stdout?

Bhairav Shah stan2k08 at gmail.com
Wed Sep 17 02:54:40 GMT 2008

Hi Jeremy,

Thanks for pointing that out.  I see now that only the torture/* files are
like that.  Other files that I looked at were correctly using
fprintf(stderr, ... ) for error cases.


On Tue, Sep 16, 2008 at 6:45 PM, Jeremy Allison <jra at samba.org> wrote:

> On Tue, Sep 16, 2008 at 06:30:48PM -0400, Bhairav Shah wrote:
> > Hello,
> >
> > I am writing a perl script that makes use of Samba and I find that some
> of
> > the error messages are getting printed to stdout.  This kinda creates a
> > problem with trying to figure out whether the message output is really an
> > error or not.  Any reason why some of the error outputs are not sent out
> > over stderr?
> >
> > As an example, in the torture_open_connection_share method in the
> > torture/util_smb.c file, the following line prints the error to stdout:
> >               printf("Failed to open connection - %s\n",
> nt_errstr(status));
> >
> > I noticed a few others that were doing the same thing.  I was expecting
> to
> > see fprintf (stderr ...) for these kinds of messages.
> Bug. Torture isn't as carefully written as some of the other
> parts of Samba as it was meant as an internal test tool.
> Jeremy.

More information about the samba mailing list