[Qgis-developer] Where stderr/stdout go on Windows

Radim Blazek radim.blazek at gmail.com
Sun Dec 17 10:29:39 EST 2006

I am trying to fix https://svn.qgis.org/trac/ticket/448
and I found that the problem is that it is not possible to duplicate
stdin/stdout. So it seems there is no stdout/stdin at all.
GRASS lib:
     if ( (stdin_orig  = _dup(_fileno(stdin ))) == -1  ||
         (stdout_orig = _dup(_fileno(stdout))) == -1 )
        db_syserror ("can't duplicate stdin/stdout");
        return (dbDriver *) NULL;
The same build of QGIS however has stdout/stdin open if it
is run from MSYS.
Anybody has idea how to get QGIS running without command
window but with stdout/stdin open (pointing to '/dev/null' for example)?

The problem is obviously in GRASS but I am not sure if we can fix that
within a week.


On 12/17/06, Mateusz Loskot <mateusz at loskot.net> wrote:
> Radim Blazek wrote:
> > Hi. Anybody has idea where messages printed to stderr/stdout go on
> > Windows if qgis is compiled without debug? I can see messages if the
> > application is started from MSYS but no messages are printed if it is
> > started from explorer, batch file or cmd.exe.
> Radim,
> AFAIK, there is no difference between stderr/stdout in debug and
> release. By default, in C and C++, stderr is bound to stdout, and stdout
> is a console. So, if you run program by double-click from the explorer,
> then stdout/stderr messeges are not printed.
> Cheers
> --
> Mateusz Loskot
> http://mateusz.loskot.net
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list