Mailing List Archive

[dbmail-bugs-799100] restart fails with socket exception
Ilja,

I have a small patch that may well fix bug #799100

https://sourceforge.net/tracker/?func=detail&atid=577642&aid=799100&group_id=85894

The general reasoning is
- other daemons can do, so should dbmail
- this must be solved in libc already

So I ended up trying SO_LINGER and lo-and-behold it appears to do the trick.

I have zero+ experience in C network programming so any takers for
critique, shoot.

I've done some testing and I'm unable to reproduce the problem when
the patch is applied.





--
________________________________________________________________
Paul Stevens mailto:paul@nfg.nl
NET FACILITIES GROUP PGP: finger paul@nfg.nl
The Netherlands________________________________http://www.nfg.nl
Re: [dbmail-bugs-799100] restart fails with socket exception [ In reply to ]
On Monday, Oct 13, 2003, at 21:41 Europe/Amsterdam, Paul J Stevens
wrote:

> I have a small patch that may well fix bug #799100
>
> https://sourceforge.net/tracker/
> ?func=detail&atid=577642&aid=799100&group_id=85894
>
> The general reasoning is
> - other daemons can do, so should dbmail
> - this must be solved in libc already
>
> So I ended up trying SO_LINGER and lo-and-behold it appears to do the
> trick.
>
> I have zero+ experience in C network programming so any takers for
> critique, shoot.
>
> I've done some testing and I'm unable to reproduce the problem when
> the patch is applied.
Hi,

We've resolved the problem.

In the CreateSocket function in server.c, the so_reuseaddress variable
was not set to 1. Now it is (in CVS, 2.0 branch) and restarting
the server should work now.

Ilja