An example how to fork Unix processes and set process group in order to write a simple Apache watchdog, connecting to a web page and eventually restarting web server when the web page does not respond within a given time limit.
#! /usr/local/bin/perl -w
## name: watchdog_httpd
## author: tibor …