ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shankar Unni <>
Subject RE: running daemons
Date Fri, 03 Aug 2001 17:29:01 GMT
Unfortunately, Java doesn't provide such a primitive.  Runtime.exec() always
waits for its child, and worse (if you're trying to create a daemon) it
creates a stdin/stdout two-way "pipe" between the parent and child so that
they can talk to each other.

However, I'm sure you can create an appropriate class that uses JNI to
accomplish this. The reason J2SE doesn't do this is that it's nearly
impossible to define a precise semantics to this operation that's portable
across every host OS (Unix, Windows, Mac, VMS, ...), but if you're not
worried about portability (or only care about a couple of OSes like POSIX
and Win32), you could do something acceptable. 

> -----Original Message-----
> From: Matthew Inger []
> Subject: Re: running daemons
> what would be nice is if there were a way to tell it not to 
> wait for it to return.

View raw message