Re: [gtk-list] Re: continue execution while updating a progress bar? (now thoughts on an Xinstall)



> On Wed, 18 Mar 1998 tile@primenet.com wrote:
> 
> > > > well, that's trivial. the hard part is having Make run while i'm
> > > > updating the toolbar.
> > > 
> > > i meant scrollbar. sorry.
> > > if anyone knows, feel free to answer :)
> > 
> > How about forking make then opening a pipe to it so you could read
> > it's progress while updating the scrollbar in your program?  I am
> > not very familiar with forking and piping in C so correct me if I
> > this is not possible.
> 
> unforunately, neither am i. this is more complicated than what i'm trying
> to get at.

It's actually fairly easy.  If you have a copy of "Advanced Programming
in the Unix Environment" by W. Richard Stevens look in section 14.2,
pipes for a good intro.  He does almost exactly what you want.  If you
don't have the book, buy it. :)  I have a routine I wrote to do what
you would need (sets up the pipe, forks, connects the childs stdout to the
pipe and then runs the external program) so you can give me a yell.  Do
note that I won't respond to the list any more as this is not really on
topic for the gtk stuff.

Roger



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