in reply to Re: Converting Proc::Background Tasks To Server
in thread Converting Proc::Background Tasks To Server
In this example, $command is being spawned off and must bring up a new process every time. I'd rather just be able to, say, repeatedly write "$args 1>&2 >some.log\n" to a pipe and then have the new line fork off a process from a $command that has already been initialized -- with something analogous to "->alive" to tell me when it is ok to fork off another similar $command.while(1){ # a bunch of stuff $command = some calculated command; $args = some calculated args; $proc{"$command $args"} = Proc::Background->new("$command $args 1> +&2 >some.log") unless $proc{"$command $args"}->alive; # a bunch of stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Converting Proc::Background Tasks To Server
by sierpinski (Chaplain) on Dec 21, 2014 at 16:04 UTC |