This sounds like the best course of action, you need to use some form of external daemonization, whether the poor man's (and portable) nohup or daemon.

For the record, os.fork in CPython is a versatile tool that's not at all readily implementable for Jython, due to underlying limitations in the JVM. (Others may wish to look at this problem again.) However, it's possible to identify subsets of fork's functionality and implement an emulation. Jason Briggs' pseudofork is just one example, although I believe it's possible now to manipulate the triple of (thread, PythonInterpreter, and PySystemState) more succinctly; see for example the function exec_code_separately in (,r=5806/jython/trunk/jython/Lib/test/

Lastly, I'd suggest a more Jythonic solution to put this all together. shows how run SimpleXMLRPCServer in WSGI. With modjy supporting WSGI, you can then run it any servlet container of your choice, which generally would have decent daemonization wrappers for this sort of thing (or use daemon), not to mention other management functionality. If you wanted something lightweight, consider Hudson's Winstone or Jetty.

- Jim

On Mon, Jan 5, 2009 at 12:28 PM, Devin Venable <> wrote:
In the end I decided to use the daemon utility (man daemon) to start and stop the jython daemon by unique name.

To start...

 daemon --name jybridge jython /opt/mypath/

To stop...

 daemon --name jybridge


On Mon, Jan 5, 2009 at 10:37 AM, Jeff Emanuel <> wrote:
In bash, use $!

Mohamed Lrhazi wrote:
> I am sorry... I was mistaken... thought it was straightforward.... like:
> start-my-process&


Jython-users mailing list

Jim Baker