This is the mail archive of the
mailing list for the frysk project.
ForkedProcess (Was: Kill and refresh)
On Fri, 2006-07-14 at 14:49 +0200, Mark Wielaard wrote:
> On Fri, 2006-07-14 at 14:17 +0200, Mark Wielaard wrote:
> > Yes, I actually have an addition to Fork which just gives you an
> > Input/OutputStream to the process to communicate with. I found that a
> > little more convenient then using signals. I'll post it to the list so
> > you can see if that is something we might want to add.
> Here it is. I found it useful to write some quick tests which needed to
> exchange information with the child process without needing to attach to
> the process or send signals between frysk and the child process.
> 2006-07-14 Mark Wielaard <email@example.com>
> * Fork.java (ForkedProcess): New static inner class.
> (ForkedInputStream): Likewise.
> (ForkedOutputStream): Likewise.
> (ForkedProcess): New static method.
> * cni/Fork.cxx (fork): New method.
> (ForkedOutputStream::write): Likewise.
> (ForkedInputStream::read(void)): Likewise.
> (ForkedInputStream::read(jbyteArray,jint,jint)): Likewise.
> At first I used Runtime.exec() for this, but since that spawns a new
> Thread that tries to wait() on all processes that didn't work nicely
> with the rest of frysk core.
> Would it make sense to add this new functionality to Fork?
Since I am using this for writing new tests I would like it to be added.