summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/exim_lock.c9
-rw-r--r--test/confs/01371
-rw-r--r--test/log/01378
-rw-r--r--test/mail/0137.userx4
-rw-r--r--test/scripts/0000-Basic/01374
5 files changed, 18 insertions, 8 deletions
diff --git a/src/src/exim_lock.c b/src/src/exim_lock.c
index 37d974477..4b2209b05 100644
--- a/src/src/exim_lock.c
+++ b/src/src/exim_lock.c
@@ -216,7 +216,7 @@ for (i = 1; i < argc; i++)
else usage();
}
-if (quiet) verbose = 0;
+if (quiet) verbose = FALSE;
/* Can't use flock() if the OS doesn't provide it */
@@ -322,7 +322,7 @@ for (j = 0; j < lock_retries; j++)
if (use_lockfile)
{
- int rc;
+ int rc, rc2;
if (verbose) printf("exim_lock: creating lock file\n");
hd = open(hitchname, O_WRONLY | O_CREAT | O_EXCL, 0440);
if (hd < 0)
@@ -334,11 +334,12 @@ for (j = 0; j < lock_retries; j++)
/* Apply hitching post algorithm. */
- if ((rc = link(hitchname, lockname)) != 0) fstat(hd, &statbuf);
+ if ((rc = link(hitchname, lockname)) != 0)
+ rc2 = fstat(hd, &statbuf);
(void)close(hd);
unlink(hitchname);
- if (rc != 0 && statbuf.st_nlink != 2)
+ if (rc != 0 && (rc2 != 0 || statbuf.st_nlink != 2))
{
printf("exim_lock: failed to link hitching post to lock file\n");
hd = -1;
diff --git a/test/confs/0137 b/test/confs/0137
index b40c83c15..b36a701c2 100644
--- a/test/confs/0137
+++ b/test/confs/0137
@@ -11,6 +11,7 @@ tls_advertise_hosts =
# ----- Main settings -----
+log_selector = +subject
domainlist local_domains = test.ex
qualify_domain = test.ex
diff --git a/test/log/0137 b/test/log/0137
index f963fb216..30ee4cdd5 100644
--- a/test/log/0137
+++ b/test/log/0137
@@ -1,19 +1,19 @@
-1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss T="First"
1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=smart T=local_delivery
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
-1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss T="Second"
1999-03-02 09:44:33 10HmaY-0005vi-00 == userx@test.ex R=smart T=local_delivery defer (-9): failed to lock mailbox TESTSUITE/test-mail/userx (lock file)
1999-03-02 09:44:33 Start queue run: pid=pppp -qf
1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=smart T=local_delivery
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp -qf
-1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss T="Third"
1999-03-02 09:44:33 10HmaZ-0005vi-00 == userx@test.ex R=smart T=local_delivery_fcntl defer (-9): failed to lock mailbox TESTSUITE/test-mail/userx (fcntl/flock)
1999-03-02 09:44:33 Start queue run: pid=pppp -qf
1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx <userx@test.ex> R=smart T=local_delivery_fcntl
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp -qf
-1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss T="Fourth"
1999-03-02 09:44:33 10HmbA-0005vi-00 == userx@test.ex R=smart T=local_delivery_fcntl_blocking defer (-9): failed to lock mailbox TESTSUITE/test-mail/userx (fcntl/flock)
1999-03-02 09:44:33 Start queue run: pid=pppp -qf
1999-03-02 09:44:33 10HmbA-0005vi-00 => userx <userx@test.ex> R=smart T=local_delivery_fcntl_blocking
diff --git a/test/mail/0137.userx b/test/mail/0137.userx
index 7dd068d10..c44698254 100644
--- a/test/mail/0137.userx
+++ b/test/mail/0137.userx
@@ -3,6 +3,7 @@ Received: from CALLER by the.local.host.name with local (Exim x.yz)
(envelope-from <CALLER@test.ex>)
id 10HmaX-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: First
Transport: local_delivery
Message-Id: <E10HmaX-0005vi-00@the.local.host.name>
From: CALLER_NAME <CALLER@test.ex>
@@ -15,6 +16,7 @@ Received: from CALLER by the.local.host.name with local (Exim x.yz)
(envelope-from <CALLER@test.ex>)
id 10HmaY-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: Second
Transport: local_delivery
Message-Id: <E10HmaY-0005vi-00@the.local.host.name>
From: CALLER_NAME <CALLER@test.ex>
@@ -27,6 +29,7 @@ Received: from CALLER by the.local.host.name with local (Exim x.yz)
(envelope-from <CALLER@test.ex>)
id 10HmaZ-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: Third
Transport: local_delivery_fcntl
Message-Id: <E10HmaZ-0005vi-00@the.local.host.name>
From: CALLER_NAME <CALLER@test.ex>
@@ -39,6 +42,7 @@ Received: from CALLER by the.local.host.name with local (Exim x.yz)
(envelope-from <CALLER@test.ex>)
id 10HmbA-0005vi-00
for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: Fourth
Transport: local_delivery_fcntl_blocking
Message-Id: <E10HmbA-0005vi-00@the.local.host.name>
From: CALLER_NAME <CALLER@test.ex>
diff --git a/test/scripts/0000-Basic/0137 b/test/scripts/0000-Basic/0137
index 0335afe57..56941941f 100644
--- a/test/scripts/0000-Basic/0137
+++ b/test/scripts/0000-Basic/0137
@@ -1,10 +1,12 @@
# mailbox locking
exim -odi userx
+Subject: First
Transport: local_delivery
First message.
****
exim_lock -v test-mail/userx
exim -odi userx
+Subject: Second
Transport: local_delivery
Second message
****
@@ -12,6 +14,7 @@ exim -qf
****
exim_lock -v -fcntl test-mail/userx
exim -odi userx
+Subject: Third
Transport: local_delivery_fcntl
Third message
****
@@ -19,6 +22,7 @@ exim -qf
****
exim_lock -v -fcntl test-mail/userx
exim -odi userx
+Subject: Fourth
Transport: local_delivery_fcntl_blocking
Fourth message
****