handle waitpid failure with EINTR

remotes/push_mirror/multihash
aCaB 15 years ago
parent 3c91587c8c
commit 43babe63b3
  1. 4
      ChangeLog
  2. 4
      clamav-milter/clamfi.c

@ -1,3 +1,7 @@
Thu Dec 16 15:31:38 CET 2010 (acab)
---------------------------------
* clamav-milter: handle EINTR during waitpid()
Thu Dec 16 14:15:33 CET 2010 (tk)
---------------------------------
* freshclam, clamd: handle EINTR during waitpid() (bb#2422)

@ -382,8 +382,10 @@ sfsistat clamfi_eom(SMFICTX *ctx) {
args[8] = NULL;
exit(execvp(viraction, args));
} else if(pid > 0) {
int wret;
pthread_mutex_unlock(&virusaction_lock);
if(waitpid(pid, &ret, 0)<0)
while((wret = waitpid(pid, &ret, 0)) == -1 && errno == EINTR);
if(wret<0)
logg("!VirusEvent: waitpid() failed: %s\n", cli_strerror(errno, er, sizeof(er)));
else {
if(WIFEXITED(ret))

Loading…
Cancel
Save