Strange behaviour with printf vs. g_print



Hello All!


        This question is probably aimed at the developers
of Gtk/glib etc... but I'll be glad to hear from anyone if they
have an answer for me.

        I'll have to start by saying that we're presently using a GTK 1.3 .
I have a dynamic shared library which links with libmysqlclient and with
glib
and uses the g_print/g_warning/g_message routines. when I link with this
library
and call a function that will use one of the g_print routines .... the
application's
standard printf fprintf etc functions won't work.

        this is strange because if I do something like this:

void main() {
        while (1) {
                g_print("gprint\n");
                printf("printf\n");
                g_warning("g_warning");
                g_message("g_message");
                fprintf(stderr, "fprintf\n");
        }
}

The standard printf functions still work.
        
        Actualy I was told by a fellow developer about this and I wrote a
main like the one above. Than I asked him what it was that he was
smoking.
Everything seemed to work fine.

        It doesnt affect my software directly but it scares me because I'm
writing software that is expected to run for weeks on end or as long as 
possible without rebooting the machine.



        Anyhow. Please excuse the long text.

Thanks in advance and cheers all.
        -Tristan


PS:
        I might not reply right away (I'll try to come check my mails
on monday but I'm on vacation next week and will be out of town).



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