
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hallo, Ich habe ein Module für ctrlproxy geschrieben, mit dem der Proxy durch Python Skripts erweiterbar ist. Hauptsächlich registrieren die Skripts callbacks für gewisse Ereignisse und können darauf reagieren. Das ganze ist thread sicher Programmiert, jedoch werden die beendeten Threads nicht vollständig gelöscht, der Prozess verweilt als defunct (zumindest under Linux, andere Platformen habe ich (noch) nicht getestet) Der Thread erscheint nichtmehr in den Threadslisten von Python, danach habe ich bereits geschaut. Auch habe ich Probiert in jeden Thread den Python kennt zu springen um zu hoffen der Eltern Thread wird den exit code abholen, vergebens. sys.exitfunc zu nutzen hat bis jetzt auch versagt. Das ganze sieht etwa folgend aus: poelzi 20633 0.1 2.2 17296 11508 pts/17 S 02:24 0:12 | \_ gdb ./ctrlproxy poelzi 15187 0.7 1.0 13136 5464 pts/17 T 05:55 0:00 | \_ /home/poelzi/Projects/ctrlproxy/ctrlproxy poelzi 15189 0.0 1.0 13136 5464 pts/17 T 05:55 0:00 | ~ \_ /home/poelzi/Projects/ctrlproxy/ctrlproxy poelzi 15190 0.0 0.0 0 0 pts/17 Z 05:55 0:00 | ~ \_ [ctrlproxy] <defunct> Ich habe einige debug ausgaben hineingeschrieben: [...] ** INFO: Loading Python scripts CREATED THREAD 16384 [...] 16384 ist die thread id in dem das script geladen wurde. [...] ID:0:/home/poelzi/Projects/ctrlproxy/example/test.py Joining channel #test IS: 0x80cba58 134560928 TS: 0x810e2d0 16386 TS: 0x80fe860 16384 TS: 0x80bb028 16384 IS: 0x8083638 16384 TS: 0x8083660 16384 IS: 0x80cba58 134560928 TS: 0x810e2d0 16386 TS: 0x80fe860 16384 TS: 0x80bb028 16384 IS: 0x8083638 16384 TS: 0x8083660 16384 ** INFO: ------------ END ------------- IS: 0x80cba58 134560928 TS: 0x80fe860 16384 TS: 0x80bb028 16384 IS: 0x8083638 16384 TS: 0x8083660 16384 IS: 0x80cba58 134560928 TS: 0x80fe860 16384 TS: 0x80bb028 16384 IS: 0x8083638 16384 TS: 0x8083660 16384 IS sind die InterpreterStates und TS die ThreadStates. 16386 muß wohl der Thread sein, der vom script erzeugt wurde, nach END sollte er korrekt beendet sein, denn Python listet ihn nichtmehr in seinen Threadlisten. Der Code is zum posten viel zu groß und Webcvs kaputt ;) Ich habe ihn hier abgelegt. http://files.poelzi.org/tmp/ctrlproxy_python/ Der eigendlich code ist in: http://files.poelzi.org/tmp/ctrlproxy_python/python.c Hat mir jemand noch eine Idee zur Ursache/Lösung ? Liebe Grüße ~ Daniel - -- nihil me cirumdat .. . .. ... . . .. . ... . .. . ... . . . pgp key @ http://files.poelzi.org/pgp.txt ED80 E53D 5269 4BB1 1E73 3A53 CBF9 A421 0A7B 003D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQE/+kffy/mkIQp7AD0RAqm0AKCOMoGcX6vcH/Ul5nIhxcvmVV0ztwCeONUk rHX9jUOaumbfRlLCwDOZEFI= =XVdI -----END PGP SIGNATURE----- _______________________________________________ Python-de maillist - Python-de@python.net http://python.net/mailman/listinfo/python-de
participants (1)
-
daniel.poelzleithner