Right, but after I test a row in the database it should force quit the process after 10 seconds via the alarm?

Any idea how I can slow it down so it doesnt crash my machine?

Anyone? :(

Hello. I am working on a Perl script that shoulld iterate through ~100 links from a MySQL table and test the links one at a time. I am using rtmpdump/mplayer to test the links (which are streaming videos), and I want to e-mail out a report after testing all the links.

The problem is the script seems to be running multiple times instead of just iterating through the list of all the links once. Also script is leaving the child "rtmpdump" and "mplayer" processes running in the background so I have thousands of orphaned processes after the script has run.

Can someone please take a look at the following logic and perhaps give me a pointer on where I went wrong? As you can see I'm using SIG{ALRM} to terminate the mplayer process after 10 seconds.

Thanks for ANY help or suggestions you can provide, it is much appreciated. Obviously I am very new to Perl and this is one of the more complicated scripts that I've ever written.

use strict;
use warnings;
use DBI;
use MIME::Lite;

require "config2.pl";
require "sendmail.pl";

our $db;
our $user;
our $pass;
our $host;

my $testtimeout = 10;
my $testoutput;

my @myworking;
my @mynotworking;

## Prepare date stamp

my (undef,undef,undef,$mday,$mon,$year,undef,undef,undef) = localtime;
$year += 1900;
$mon += 1;
my $date = sprintf "%04d%02d%02d", ,$year, $mon, $mday;
#print $date;
open (FILE, ">", "results_" . $date . ".html") || die "Could not open file: $!\n";
my $path = "results_" . $date . ".html";

## Stream type ...