Re: Redirecting output

I did it this way with a yacc and lex problem.
The main problem is that you have to have two asynchrony
processes, because any action in the callback only takes place
if this the callback has finished .
The best way is to use gtk threads (have a look on the documentation)
Readirect stderr or stdout to a named pipe open (take care of blocking
open with
no block) . In the 2nd thread open this
pipe for read and show a error dialog.

I hopw it will help.

Ivo Andrejco wrote:

Hi everyone,

I am writing an application that connects to Postgresql. (I know  am not
the only one.) And here's my problem. Postgresql writes error messages
to stdout, I would like to catch them and display in my application.
I was looking at similar problems in the list but they mostly invoke a
new process, open a pipe and that's it. In my case everything runs as one
process. Is there any way to do it without spawning a new process.

Thanks Ivo

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

R=I+S  Rapp Informatik Systeme GmbH
       Rosenbühlstr. 24
       D-89182 Bernstadt
       Tel:  +49 (0)7348-7755
       Fax:  +49 (0)7348-6086
E-MAIL  mailto: guenther rapp-informatik de

Attachment: guenther.vcf
Description: Card for gŁnther

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