[Samba] Why are some error messages printed to stdout?
Stan
stan2k08 at gmail.com
Fri Sep 19 05:02:49 GMT 2008
Hi again :)
Ok. I was looking at something else now and stumbled into a similar thing.
This time it is in the client code (client.c):
if (!NT_STATUS_IS_OK(status)) {
d_printf("Connection to \\\\%s\\%s failed - %s\n",
server, share, nt_errstr(status));
talloc_free(ctx);
return NULL;
}
Haven't looked into what exactly d_printf does, but do see in my output that
it is going out on the stdout and not stderr as might have been expected.
Thanks.
On Tue, Sep 16, 2008 at 10:54 PM, Bhairav Shah <stan2k08 at gmail.com> wrote:
> 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.
>
> Regards.
>
>
> 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