AutomateWithPerl has asked for the wisdom of the Perl Monks concerning the following question:
Looks pretty simple, huh? The problem: When the GUI exits, the child process gets screwed up somewhere and crashes. I then either get a popup that perl.exe has tried to write to mem location 0x0, or I get some nice popup that informs me that Perl has crashed, and would I like to send a nice note to M$. My previous solution: Since only the child process has crashed, I use the parent process to wait for these annoying popups and deal with them. This solution did not work when we started testing in evil Windows 7. Instead, both processes would lock up, thereby preventing me from dealing with the popup. After pulling what's left of my hair out the last few days, I came upon a band-aid solution:... # launch the window $pid = fork; unless( $pid ) { `MyGUI.exe`; exit 1; } # much code to manipulate the GUI, etc here.. # now close the GUI.. &PressAButton( $gui_handle, "&Close" ); # should be done here
Has anyone encountered this before? Are there any dire affects to killing my process? Thanks in advance.... # launch the window $pid = fork; unless( $pid ) { `MyGUI.exe`; exit 1; } sleep 10; # long enough for the GUI to launch # here is the kicker: kill 9, $pid; # now continue with my usual testing...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A solution to a pretty fork()ed up problem with GUI testing
by BrowserUk (Patriarch) on Oct 17, 2010 at 03:15 UTC | |
|
Re: A solution to a pretty fork()ed up problem with GUI testing
by eyepopslikeamosquito (Archbishop) on Oct 17, 2010 at 04:28 UTC | |
by AutomateWithPerl (Novice) on Oct 18, 2010 at 15:29 UTC |