[html5] setting up, and keeping up, a standalone html5 validator

john gale john at smadness.com
Mon Jun 7 16:19:40 PDT 2010


On Jun 3, 2010, at 3:32 PM, john gale wrote:

> I'd like to keep the webserver running automatically, and I'm trying to find the most reliable way to do so.  Running the "python build/build.py run" command starts up the java server, but it seems to exit as soon as return is pressed in the terminal window.  Additionally, the python process seems to start and replace itself with the java process which causes setting up a launchd (cron-like) job to keep it running futile, since launchd sees the python process exit and tries to restart it.
> 
> Is there a recommended way of making the java webserver start at login, and continue running in the background?  launchd is the most supported way to go on Mac OS X, but this would require the python process hanging around until the java servlet dies, and I don't want to start hacking with it unless I know there's no other way.


(This is the validator.nu java servlet)

I'm starting to play around with replacing the os.execvp commands in build.py runValidator() with os.spawnvp instead, hopefully keeping the python process around so that it can monitor it's child and prevent launchd from thinking it's exited.

Can anyone think of a reason this would be a bad thing to do?

thanks,

	~ john


More information about the Help mailing list