[srvx-commits] CVS: services/src sendmail.c,1.8,1.9
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2003-01-17 03:18:37
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv18963/src
Modified Files:
sendmail.c
Log Message:
use waitpid() and loop until we find the child (or get a non-EINTR errno)
Index: sendmail.c
===================================================================
RCS file: /cvsroot/srvx/services/src/sendmail.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** sendmail.c 10 Jan 2003 01:43:22 -0000 1.8
--- sendmail.c 17 Jan 2003 03:18:33 -0000 1.9
***************
*** 187,192 ****
fflush(out);
fclose(out);
! rv = wait(&res);
! if ((rv == child) || ((rv == -1) && (errno == EINTR))) {
/* accept the wait() result */
} else {
--- 187,194 ----
fflush(out);
fclose(out);
! do {
! rv = waitpid(child, &res, 0);
! } while ((rv == -1) && (errno == EINTR));
! if (rv == child) {
/* accept the wait() result */
} else {
|