On 9/12/2012 6:20 AM, andrea crotti wrote:
I wrote a decorator that takes a function, run it in a forked process
and return the PID:
This strikes me as an abuse of the decorator syntax.
@wrap
def f(): pass
is just syntactic sugar for
def f(): pass
f = wrap(f)
but that is not what you are do
On Wed, Sep 12, 2012 at 3:50 PM, andrea crotti
wrote:
> I wrote a decorator that takes a function, run it in a forked process
> and return the PID:
>
> def on_forked_process(func):
> from os import fork
> """Decorator that forks the process, runs the function and gives
> back control t