This is the mail archive of the mailing list for the frysk project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ForkedProcess (Was: Kill and refresh)

Hi Andrew,

On Thu, 2006-08-03 at 10:24 -0400, Andrew Cagney wrote:
> >> 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.
> >>     
> Two thoughts come to mind:
> - we've a mechanism for communicating between frysk and a debug process 
> using signals, rather than introducing custom mechanisms, can something 
> based or following the existing technique be used?

Sure, I just found it a lot simpler to just use stdin/out. The passing
back and forth of signals feels a little awkward and means you have to
be careful that it doesn't interfere with the main frysk event loop. It
seems you keep starting/stopping/draining the event queue in that
scheme. Using stdin/out with the test programs makes it a little easier
to write tests in one flow with the core frysk event loop just running. 

> - since it is only intended for testing and testing fork, can this live 
> in TestLib - keeps frysk.sys's interfaces as close as possible to the 
> underlying mechanism?

Can do. Will move it to TestLib. It was just so similar to the rest of
the Fork class that it seemed natural to put it there.

> This code can't be plugged into frysk's event loop (I/O Stream can't be 
> integrated into frysk.sys.Poll) so really isn't part of the core.

OK. For the tests the idea was indeed to have it explicitly not be part
of the event loop so it doesn't interfere with it.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]