From: Michael R. <mik...@at...> - 2003-04-30 19:18:34
|
Ok I am making progress on the new plugin for freevoweb. It starts. It serves the cgi's but alas it causes freevo to never exit when it is activated. I add the following to local_conf.py WWW_PORT = 8080 WWW_IP_ALLOW = ['192.168.1.3','192.168.1.2','127.0.0.1'] plugin.activate('web.PluginInterface') i put this file in $FREEVO_STARTDIR/src/plugins/ see web.py attached I have slightly modified webserver.py to be a little nicer about chdir. I will eventually have it only serve the cgi's from the base directory otherwise you never get the style sheet or gifs. (I.e. it will server /htbin/guide.cgi, /cgi-bin/guide.cgi and /foobar/guide.cgi all of which do horrible things to where we expect to find the css and only /guide.cgi is right) see webserver.py attached So everything really works well until you try to /etc/init.d/freevo stop or try to select shutdown from the ui menu. it thinks it stops everything but ps -ef still shows freevo processes (freevo_loader) still running and they don't die until you killall -9 freevo_loader The webserver.py was written to be resilient and does a try, and except which kills it for keyboard interupt and just restarts it if it does for some other reason. So I figured that was the problem. So I commented out the pass and put sys.exit. still doesn't work. The only clue about what went wrong in the /etc/init.d/freevo stop case in the logfile is: Traceback (most recent call last): File "src/main.py", line 330, in ? File "src/main.py", line 237, in signal_handler File "/usr/local/freevo/src/util.py", line 413, in killall print 'killall: Sending signal %s to pid %s ("%s")' % a ValueError: I/O operation on closed file and from the GUI it will hang like this: killall: Sending signal 9 to pid 2428 ("./runtime/dll/freevo_loader ./runtime/apps/freevo_python src/main.py ") In both cases, the GUI does go away on the screen but shutdown doesn't seem to happen and this system will shutdown normally either way if I comment out the plugin activation Any help would be much appreciated. I know very little about python threads (I do know how to do it in other languages). -- Mike Ruelle mik...@at... http://world.std.com/~mruelle/ |