in reply to shelling out too much
So what are your options? If you don't need "return values" from "myscript" (like if it is mailling something), you can do a "fork-and-exec" to run it, which will let your main program continue running at full speed.
The tricky part, is if you need return values. In that case, there is IPC, POE and GUI's which use event loops like Tk, Gtk2, Wx , etc. You can also setup some pipes and pipe your data back from a fork and exec.
Since you claim your problem is the -h option, preventing a require, why not make a copy of "myscript" and call it myscript1, and just hardwire the -h option into it, and require it? I have a feeling that it won't fix your problem, because it involves a time consuming process.
|
|---|