On Tue, May 12, 1998 at 08:30:44AM -0700, Jack Killpatrick wrote:
> Could my script just look for _no_ exit code coming from sendmail, write an
> error to the user in html and write a record to my database detailing the
> non-send? Seems like that could work.
Ah. Now that I understand this a bit better, I have to take back
my earlier comment about monitoring the return status of sendmail,
because that's just what you want to do.
Another possible way to do this, at the cost of one extra process,
is to use this trick, which is something I tend to do in C rather
a lot -- I'm putting this in pseudocode because it's
early and I can't find my Perl quick reference this morning. Heck,
I can't even find my coffee mug yet!
# we've got a user name to mail to...
fork()
if (we're the child process) {
then exec sendmail
# We should never get here unless the exec of sendmail
# fails, since a successful exec does NOT return
take whatever action gets taken when mail doesn't work
# like making a note of it in a database
exit
}
# We are the parent process; keep going with whatever else we do
# If we want to wait for the child to complete before we continue
# then we need to do a
wait()
# here; otherwise we'll just go on in parallel with the child.
---Rsk
Rich Kulawiec
[EMAIL PROTECTED]
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------