#!/usr/bin/perl

#open(FAKE, "./animate.pl |");
if ($pid = fork) {
} elsif (defined $pid) {
    system("./animate.pl");
    exit 0;
} else {
    die "fork failed?\n";
}

print "************************************************\n";
print "*                                              *\n";
print "*                                              *\n";
print "*                                              *\n";
print "*                                              *\n";
print "*     DON'T FORGET TO CLICK PLAY IN NAM !!!    *\n";
print "*                                              *\n";
print "*                                              *\n";
print "*                                              *\n";
print "*                                              *\n";
print "************************************************\n";

while (1) {
    print "Hit enter to reset the GNP monitor";
    <STDIN>;

    #open(PS, "ps ax \|grep perl \|grep animate |");
    #$l = <PS>;
    #close(PS);
    #@la = split(/\s+/, $l);
    #system("kill -10 $la[0]");
    kill 10, $pid;
}
