-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
HI, i've build libxmlrpc-c with thread support. There's a problem into
thread cancellation:
For example:
I've create a simple XMLRPC server in C listening to port 8080.
when i do (i'm simulating Dos Attack)
for ((i=0;i=1;i=0)) do cat /dev/urandom |nc xxx.xxx.xxx.xxx 8080; done
after a shor period the server stop responding and i've notice that
there's several thread created by server in ZOMBIE state.
i've included a patch to resolve this:
- --- ../xmlrpc-c-0.9.10/lib/abyss/src/thread.c 2001-02-01
18:18:08.000000000 +0100
+++ lib/abyss/src/thread.c 2004-02-27 09:49:01.000000000 +0100
@@ -60,8 +60,9 @@
~ pthread_attr_setstacksize( &attr, THREAD_STACK_SIZE );
~ if( pthread_create( t,&attr,(PTHREAD_START_ROUTINE)func,arg)==0)
~ {
- - pthread_attr_destroy( &attr );
- - return (pthread_detach(*t)==0);
+ pthread_attr_destroy( &attr );
+ pthread_detach(*t);
+ return 0;
~ }
~ pthread_attr_destroy( &attr );
~ return FALSE;
Bye...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAPwZdWvwfApXpbjwRAgUWAKDmzFVLNRYhT6ydwqmDqkkLgwtFoACgnAGf
1COW08bsuCdoFEYAh1s5kY0=
=JC6B
-----END PGP SIGNATURE-----
|