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. Thanks, Stan
Jeremy Allison
2008-Sep-16 22:45 UTC
[Samba] Why are some error messages printed to stdout?
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.