]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: waitpid() for executed sendmail binary wasn't called correctly.
authorTimo Sirainen <tss@iki.fi>
Mon, 27 Jun 2011 23:41:06 +0000 (02:41 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 27 Jun 2011 23:41:06 +0000 (02:41 +0300)
It may have failed with -ECHILD, if the sendmail binary itself forked other
processes.

src/lib-lda/smtp-client.c

index fe2a318b6ee8967b95ce413e0c27b1ba13426f38..50d630523b5b9a5bb84dd1dc68528b088b5fc4a6 100644 (file)
@@ -101,6 +101,7 @@ smtp_client_open_sendmail(const struct lda_settings *set,
 
        client = i_new(struct smtp_client, 1);
        client->f = *file_r = fdopen(fd[1], "w");
+       client->pid = pid;
        if (client->f == NULL)
                i_fatal("fdopen() failed: %m");
        return client;