fightliteracy has asked for the wisdom of the Perl Monks concerning the following question:
unless ($pid = fork) { unless (fork) { close (STDOUT); foreach (@emaillist) { if (check_email($_)) { open(MAIL,"|$mailprog -t") || print "Can't open $!"; print MAIL "To: $_\n"; print MAIL "Reply-to: $adminemail\n"; print MAIL "From: $adminemail\n"; print MAIL "Subject: $subject\n"; print MAIL "\n$body\n"; close(MAIL); } } &process_complete; exit(0); } print "Content-type: text/html \n\n"; print "Sending emails in the background. close your browser"; exit (0); } waitpid($pid,0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Forking not completing
by merlyn (Sage) on Mar 15, 2001 at 03:52 UTC | |
|
Re: Forking not completing
by larryl (Monk) on Mar 15, 2001 at 06:33 UTC | |
|
Re: Forking not completing
by McD (Chaplain) on Mar 15, 2001 at 04:12 UTC | |
|
Re: Forking not completing
by skazat (Chaplain) on Mar 15, 2001 at 04:27 UTC | |
|
Re: Forking not completing
by arturo (Vicar) on Mar 15, 2001 at 03:54 UTC | |
|
(tye)Re: Forking not completing
by tye (Sage) on Mar 15, 2001 at 19:34 UTC | |
by Anonymous Monk on Mar 16, 2001 at 01:19 UTC | |
by tye (Sage) on Mar 16, 2001 at 01:46 UTC |