dovecot: waitpid() fix
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 7 15:09:31 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/5cf1c1ae7dd8
changeset: 6230:5cf1c1ae7dd8
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 07 15:09:26 2007 +0300
description:
waitpid() fix
diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
src/auth/mech-winbind.c | 6 +++---
diffs (20 lines):
diff -r ad1b948c5fa2 -r 5cf1c1ae7dd8 src/auth/mech-winbind.c
--- a/src/auth/mech-winbind.c Tue Aug 07 14:54:55 2007 +0300
+++ b/src/auth/mech-winbind.c Tue Aug 07 15:09:26 2007 +0300
@@ -62,13 +62,13 @@ static void winbind_helper_disconnect(st
static void winbind_wait_pid(struct winbind_helper *winbind)
{
- int status;
+ int status, ret;
if (winbind->pid == -1)
return;
- if (waitpid(winbind->pid, &status, WNOHANG) == -1) {
- if (errno != ECHILD && errno != EINTR)
+ if ((ret = waitpid(winbind->pid, &status, WNOHANG)) <= 0) {
+ if (ret < 0 && errno != ECHILD && errno != EINTR)
i_error("waitpid() failed: %m");
return;
}
More information about the dovecot-cvs
mailing list