[exim-dev] [Bug 1053] New: log_write() doesn't handle interr…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Phil Pennock
Date:  
À: exim-dev
Nouveaux-sujets: [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files, [exim-dev] [Bug 1053] log_write() doesn't handle interrupted writes to log-files
Sujet: [exim-dev] [Bug 1053] New: log_write() doesn't handle interrupted writes to log-files
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1053
           Summary: log_write() doesn't handle interrupted writes to log-
                    files
           Product: Exim
           Version: N/A
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Logging
        AssignedTo: pdp@???
        ReportedBy: pdp@???
                CC: exim-dev@???



Артем Каялайнен reported to exim-users in message
<AANLkTikBJWNJzVFS8B7JyQA9++P11BO8ESQDSmYV1tv+@???> (2010-12-27)
that he sees paniclog entries of the form:

2010-12-25 23:17:44 [22683] failed to write to main log: length=115 result=-1
errno=4 (Interrupted system call)

Looking at the code, log.c:log_write() calls log_write_failed() immediately
after a write() returns a value other than the length of the data to be
written. This is actually legitimate non-error Unix behaviour, although for
short writes such as used when logging in Exim is unusual to see. Perhaps his
platform has taken to interrupting writes immediately, more often?

In any case, such instances need to be changed to loop while rc==-1 and
errno==EINTR and incrementally write whenever rc >= 0 and rc < length.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email