sub DESTROY {
my($self) = @_;
- if(exists $self->{xvnc_pid}) {
- kill("KILL", $self->{xvnc_pid});
+ if(exists $self->{selenium_rc}{xvnc_server_proc} and
+ exists $self->{selenium_rc}{selenium_server_proc}) {
+ $self->{selenium_rc}{xvnc_server_proc}->complete ||
+ $self->{selenium_rc}{xvnc_server_proc}->kill("KILL");
+ $self->{selenium_rc}{selenium_server_proc}->complete ||
+ $self->{selenium_rc}{selenium_server_proc}->kill("KILL");
}
}