executing a background script from embedded perl

Igor Sysoev is at rambler-co.ru
Thu Sep 11 11:45:11 MSD 2008


On Thu, Sep 11, 2008 at 05:05:26PM +0930, Kingsley Foreman wrote:

> Hi guys just wondering if  you could run
> exec("sleep 200 &") in an embedded perl script and let nginx keep doing its 
> thing.
> 
> Obviously sleep is just an example however i don't appear to be able to run 
> a program in the background.
> the nginx process waits until the backgrounded script completes before 
> continuing.

BTW, does not call fcntl(F_SETFD, FD_CLOEXEC) for sockets/etc., so
all these files will be inherited to an exec()uted process.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list