in reply to wxPerl Event Handling/GUI process control

Coincidentally, I just implemented this very thing with Wx just last week.

Just use IPC::Run to fork your runProcess1() and return control to Wx::MainLoop. To effect a pause rather than a stop, you'll probably want to use signals (IPC::Run::signal) rather than IPC::Run::kill_kill to terminate the detached process. Maintaining state "is left as an exercise to the reader" :-)

Because your runProcess1() will be detached and the Wx GUI functional, you'll want to disable any GUI elements that could do things that might change the environment of the background process in an undesirable way.

Wow, two plugs for IPC::Run in one day... and I don't even know the author!

  • Comment on Re: wxPerl Event Handling/GUI process control