Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9326/src/backends/monet5
Modified Files:
merovingian.mx
Log Message:
propagated changes of Tuesday Oct 07 2008
from the SQL_2-24 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/10/07 - mr-meltdown: src/backends/monet5/merovingian.mx,1.48.2.19
Fix thread leak: a joinable thread lives on until someone joins on it, which in
this case we don't do, hence a leak. Making it detached solves the problem.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/10/07 - mr-meltdown: src/backends/monet5/merovingian.mx,1.48.2.20
Since we're broadcasting, the address becomes 0.0.0.0 on Solaris, so ignore
that one too.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: merovingian.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian.mx,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- merovingian.mx 30 Sep 2008 12:45:14 -0000 1.56
+++ merovingian.mx 7 Oct 2008 12:48:10 -0000 1.57
@@ -708,6 +708,7 @@
stream *sfdin, *sfout;
merovingian_proxy *pctos, *pstoc;
pthread_t ptid;
+ pthread_attr_t detachattr;
/* quick 'n' dirty parsing */
if (strncmp(url, "mapi:monetdb://", sizeof("mapi:monetdb://") - 1) ==
0) {
@@ -794,7 +795,9 @@
pctos->name = GDKstrdup(client);
pctos->co_thr = ptid;
- if (pthread_create(&ptid, NULL,
+ pthread_attr_init(&detachattr);
+ pthread_attr_setdetachstate(&detachattr, PTHREAD_CREATE_DETACHED);
+ if (pthread_create(&ptid, &detachattr,
(void *(*)(void *))proxyThread, (void *)pctos)
< 0)
{
close_stream(sfout);
@@ -1520,7 +1523,9 @@
}
/* ignore messages from self: FIXME make this more robust */
- if (strcmp(host, lhost) == 0 || strcmp(host, "localhost") == 0)
+ if (strcmp(host, lhost) == 0
+ || strcmp(host, "localhost") == 0
+ || strcmp(host, "0.0.0.0") == 0)
continue;
if (strncmp(buf, "HELO ", 5) == 0) {
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins