Re: [gtk-list] RE: capturing error messages



Steven H_bert wrote:
> Before Erik answers this one...

:-))). People are actually expecting me to answer...

> Look at the "Advanced UNIX programming" book.

Correct answer. You actually need a couple of pipes between the parent
and the child process. The child connects the pipes to stdout and stderr
before it exec()s a new process. For some exmple code, have a look at
the DOSemu source (available at http://www.dosemu.org/), file
src/base/misc/dos2linux.c, function run_unix_command(). 


Erik

> > -----Original Message-----
> > From: Aaron Walker [mailto:amwalker@gate.net]
> > Sent: Friday, November 26, 1999 1:16 PM
> > To: gtk-list@redhat.com
> > Subject: [gtk-list] capturing error messages
> > 
> > 
> > is there a way to capture what a program sends to stderr() 
> > and redirect
> > it to a error dialog box?
> > I am writing an app that is a GUI front end to another 
> > program, I would
> > like to capture all errors and make an error dialog box.

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/



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