Messages in this thread | | | Date | Wed, 24 Jun 1998 23:04:24 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: Sendmail 8.9.0 claims a Linux kernel bug |
| |
On 24 Jun 1998, Ben Gertzfield wrote: [SNIPPED... getting too long] > > In any case, here's a preliminary patch to sendmail to fix this > problem for Linux. Is #ifdef __linux__ the right way to check if > we're compiling under Linux?
I wouldn't put that there. The code itself is __wrong__. It shouldn't be "fixed" just to run on Linux.
> > Are there any errors we should ignore besides ETIMEDOUT and > EHOSTUNREACH?
They should all be ignored, and the perfectly usable socket should not be closed. The code to accept() should wait forever until somebody succeeds in making a connection, i.e.,
lotherend = socksize; do { t = accept(DaemonSocket, (struct sockaddr *)&RealHostAddr, &lotherend); while (t < 0);
The process will sleep (in the kernel) until a connection is made or some transcient error (like an alarm EINTR going off), if an interrupted system call, accept() is immediately called again.
"lotherend" containing sizeof(struct sockaddr_in), will not change due to the system call, and "errno" will be modified to 0 if the call succeeded so it doesn't have to be initialized to 0.
Cheers, Dick Johnson ***** FILE SYSTEM MODIFIED ***** Penguin : Linux version 2.1.105 on an i586 machine (66.15 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |