summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2017-07-05 08:47:56 +0200
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2017-09-16 15:15:09 +0200
commit4c0a7a9cb02f9904c2e890f77ff8ce3a6beb25f4 (patch)
treed0b019c40507decd1935c76a5b4cc4298345e730 /src
parent349d08690bb7044b73334d3699d780bddf7de8b0 (diff)
Do not use O_NONBLOCK for reading the delivery transport pipe
Diffstat (limited to 'src')
-rw-r--r--src/src/deliver.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/src/deliver.c b/src/src/deliver.c
index b8a55b20a..eac5bf770 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -848,7 +848,7 @@ deliver_host = addr->host_used ? addr->host_used->name : NULL;
addr->host_used
|| Ustrcmp(addr->transport->driver_name, "smtp") == 0
|| Ustrcmp(addr->transport->driver_name, "lmtp") == 0
- ? addr->message : NULL);
+ ? addr->message : NULL);
deliver_host_port = save_port;
deliver_host_address = save_address;
@@ -2221,7 +2221,7 @@ if ( !shadowing
addr->return_filename =
spool_fname(US"msglog", message_subdir, message_id,
string_sprintf("-%d-%d", getpid(), return_count++));
-
+
if ((addr->return_file = open_msglog_file(addr->return_filename, 0400, &error)) < 0)
{
common_error(TRUE, addr, errno, US"Unable to %s file for %s transport "
@@ -4615,11 +4615,15 @@ for (delivery_count = 0; addr_remote; delivery_count++)
that it can use either of them, though it prefers O_NONBLOCK, which
distinguishes between EOF and no-more-data. */
+/* The data appears in a timely manner and we already did a select on
+all pipes, so I do not see a reason to use non-blocking IO here
+
#ifdef O_NONBLOCK
(void)fcntl(pfd[pipe_read], F_SETFL, O_NONBLOCK);
#else
(void)fcntl(pfd[pipe_read], F_SETFL, O_NDELAY);
#endif
+*/
/* If the maximum number of subprocesses already exist, wait for a process
to finish. If we ran out of file descriptors, parmax will have been reduced
@@ -7011,7 +7015,7 @@ if (addr_local || addr_remote)
if (journal_fd < 0)
{
uschar * fname = spool_fname(US"input", message_subdir, id, US"-J");
-
+
if ((journal_fd = Uopen(fname,
#ifdef O_CLOEXEC
O_CLOEXEC |