in reply to Passing arguments to a background process...
Apart for this, I' don't like much the idea of launching another process from a web page. You sure there is no smarter way to do it, like having a process running and queuing requests to it? As you don't know when the process will end, I presume what you need to do is not synchronous. You could just add a flag on a table (or write a flag-file in a directory) and then a single process would look for existing flags and process them one at a time.
This has the adventages that you 'pay' for program startup only once (process creation and code compilation, if it's in Perl), you have no racing conditions to take care of, and you can write readable logs (as it will process one thing at a time), and as you have only one instance running there is only one copy of the program in RAM at a given time.
My 0.02 euros
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing arguments to a background process...
by aquarium (Curate) on Dec 05, 2003 at 11:20 UTC | |
by Anonymous Monk on Dec 05, 2003 at 23:07 UTC | |
by chanio (Priest) on Dec 06, 2003 at 06:21 UTC |