[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

5053: Re: [MUD-Dev] Mail from mud Zoran's final Imp

[Full Header] [Plain Text]
From: coder@ibm.net
Newsgroups: nu.kanga.list.mud-dev
Date: Thu, 01 Jan 98 16:41:42 -0800
References: [1]
Organization: Kanga.Nu
On 01/01/98 at 01:55 PM, Stephen Zepp <zoran@enid.com> said:
>  sprintf( mailbuf, "mail -s \"%s\" %s <%s%s",
>     m_subject, m_address, MAIL_DIR, mfilename );
...
>  system( mailbuf );
>  sprintf( delbuf, "rm %s%s", MAIL_DIR, mfilename );
>  system( delbuf );

A lurking and insidious problem here is that you don't detect when mail
delivery fails.  This can be a bitch to a) notice when it happens, and b)
determine the cause when it does

I'd suggest putting in a signal handler which triggers on the child
dieing, and then reports an appropriate response to the user if the
delivery failed.  It's fairly trivial to do: you can use any of your
standard IPC calls to handle reporting the failure/success code (I do it
with threads instead of full processes via, so I do the report back via
the thread object for the mailer thread).

--
J C Lawrence                               Internet: claw@null.net
----------(*)                              Internet: coder@ibm.net
...Honourary Member of Clan McFud -- Teamer's Avenging Monolith...