MUD-Dev
mailing list archive

Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

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



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...




Other Periods  | Other mailing lists  | Search  ]