[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Miraculous problem, possibly BAD!
On Mon, Dec 06, 1999 at 01:02:38AM -0500, Ken Lalonde wrote:
> I've seen queue files with no corresponding transport entry too,
> on Solaris 2.5.1/2.6, local disk, UFS, high traffic load.
> Checking syslog, I see occasional scheduler unlink() failures,
> with status EBUSY. I suspect these correspond to the orphaned files.
...
> I remember similar problems with rename() returning EBUSY
> under Solaris, requiring a similar workaround for the router.
> This sort of OS failure is so 80's...
And here is a diff for it which should apply anywhere since 2.99.49.
Index: lib/esyslib.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/lib/esyslib.c,v
retrieving revision 1.2
diff -u -r1.2 esyslib.c
--- lib/esyslib.c 1998/07/28 08:53:44 1.2
+++ lib/esyslib.c 1999/12/06 15:06:36
@@ -138,7 +138,8 @@
{
int r;
- r = unlink(file);
+ while ((r = unlink(file)) < 0 && (errno == EBUSY || errno == EINTR))
+ ;
if (r < 0) {
int serrno = errno;
fprintf(stderr, "%s: unlink(%s): %s\n", progname,
> Ken Lalonde
> Network Engineering
> UUNET, a WorldCom Company
--
/Matti Aarnio <mea@nic.funet.fi>