in reply to Getting Close and Cuddly with the sleep() function
Update: Maybe you should also use a semaphore to prevent other istances of the script from running simultaneously...#!/usr/bin/perl -wT use strict; use CGI; if(fork()) { my $q = new CGI; print $q->header(); print $q->start_html(); ## print your html here print $q->end_html; } else { close STDIN; open(STDOUT, ">>/tmp/yourscript.log") || die "Can't redirect stdou +t"; open(STDERR, ">&STDOUT") || die "Can't dup stdout"; #you have to log warnings somewhere... select(STDERR); $| = 1; # so you can see what's appening with tail... select(STDOUT); $| = 1; #your email stuff here... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Getting Close and Cuddly with the sleep() function
by skazat (Chaplain) on Nov 06, 2000 at 04:32 UTC | |
by cianoz (Friar) on Nov 06, 2000 at 04:51 UTC | |
by skazat (Chaplain) on Nov 06, 2000 at 06:01 UTC | |
by cianoz (Friar) on Nov 06, 2000 at 16:09 UTC |