Re: [Sqlrelay-discussion] Forked listener removes unix socket file (patch available)
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2011-11-10 22:35:39
|
Ahhh, I see the problem...
I think a cleaner solution might be to remove the setting of pidfile to
NULL after the fork() and just wrap the removal of the pid and unixport
files with an "if (!isforkedchild) {" in the destructor. Then the
semset, idmemory and cmdl objects would still be freed.
What do you think?
Dave
On 11/10/2011 10:41 AM, Renat Sabitov wrote:
> Hello David,
>
> We've discovered weird problem in sqlrelay. In some circumstances
> forked listener removes unix socket file. It happens in alarm handler,
> when forked listener recieves SIGALRM and calls staticlistener's
> destructor. You've already put some protection for pidfile, shared
> memory and semaphores, but not for "unixport". As a result listener
> stops getting new connections by the local socket, though continues to
> accept connection by tcp.
>
> Please look at the patch attached.
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
>
>
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
> http://www.doteasy.com
|