|
Re: forking an external process: msg#00022gnome.gtk+.perl
On tir, 2002-05-07 at 22:04, Kim Schulz wrote: > > I want my gui to be accesable even when an external process is doing > some work. > My program does the following: > initialise the GUI > exec of a wget process > wait for it to return > do somthing to the return which will update the GUI (add rows to a > clist) > Rather than figuring out how fork and friends work you might want to do something like the following (not tested): my $xml = ""; my $ua= LWP::UserAgent->new; my $request = HTTP::Request->new('GET', 'http://www.slashdot.org/slashdot.rdf'); my $response = $ua->request($request, sub { my($data, $response, $protocol) = @_; # do something to data $xml .= $data; Gtk->main_iteration while Gtk->events_pending; }, 4096); here $xml should hold the file... ./borup |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: forking an external process: 00022, Chas Owens |
|---|---|
| Next by Date: | Re: forking an external process: 00022, Toby Gray |
| Previous by Thread: | Re: forking an external processi: 00022, Chas Owens |
| Next by Thread: | Re: forking an external process: 00022, Toby Gray |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | Mail Home | sitemap | FAQ | advertise |