in reply to Re: Re: Re: Re:(wog) Win32::Gui + Threading?
in thread Win32::Gui + Threading?
pipe(FROM_P, TO_C) or die "pipe: $!"; select(((select(TO_C), $| = 1))[0]); if (!(my $pid = fork)){ close(TO_C); #close(FROM_C); my $running = 1; while(my $line = <FROM_P>) { Win32::GUI::MessageBox(0,"Child Pid $$ just read this: $line","G +MS Alert"); chomp($line) if($line =~ m/\n$/o); if(lc($line) eq 'exit'){ Win32::GUI::MessageBox(0,"Exit","GMS"); sleep(20); #To allow time to read the MessageBox... if it eve +r comes up... exit; } } }
sub GMSMain_Terminate { defined(my $win = $Win32::GUI::Loft::window{GMSMain}) or return(1); print TO_C 'exit'; return(-1); } sub mnuFileExit_Click { defined(my $win = $Win32::GUI::Loft::window{GMSMain}) or return(1); print TO_C 'exit'; return(-1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re:(wog) Win32::Gui + Threading?
by wog (Curate) on Nov 13, 2001 at 04:08 UTC | |
by Flame (Deacon) on Nov 13, 2001 at 04:53 UTC | |
by wog (Curate) on Nov 13, 2001 at 05:39 UTC | |
by Flame (Deacon) on Nov 13, 2001 at 05:50 UTC |