[imps] setting up, and keeping up, the html5 validator.nu java servlet
john at smadness.com
Wed Aug 25 15:36:45 PDT 2010
On Aug 25, 2010, at 12:52 AM, Henri Sivonen wrote:
> On Aug 4, 2010, at 23:55, john gale wrote:
>> Is there a recommended way of making the java webserver start at login, and continue running in the background?
> I don't have a proper launchd-based answer for OS X. The deployments on validator.nu and html5.validator.nu run on Linux, and there's a cron job that runs a shell script that has <&- 1>/dev/null 2>&1 & at the end of the java command. (The script in only run if there's an empty deployment trigger file for the cron job to find. The cron job essentially polls for the trigger file in the file system and removes the trigger after itself. The java process knows how to get rid of the previous java process.)
Do you know why there's a <&- in the command? Does the servlet require a closed stdin to run properly without a tty?
The problem I'm running into is that the servlet is quitting itself, possibly because of the result of not having stdin, or having unexpected stdin. I'm not familiar with enough with stdin and/or what the servlet is expecting. I tried the equivalent of </dev/null but that doesn't seem to fix the problem. launchd itself essentially doesn't allow for a stdin of "&-" so I'm looking for other alternatives. Do you have any ideas? Or possibly ways of modding the servlet to continue running despite receiving any stdin?
More information about the Implementors