I want to fork a process or a thread in the nginx module, is that allowed

Piotr Sikora piotr.sikora at frickle.com
Wed May 5 05:16:20 MSD 2010


Hi,

> I want to fork a process or a thread to do some special work, is that 
> allowed? Thanks for any suggestions.

This really depends on what "special work" do you want to do. For example, 
I'm forking process to copy "large files" in the background in 
ngx_slowfs_cache [1], but the child process just copies file and exits right 
after it, so there are no synchronization problems, etc. Anything more 
complicated probably isn't very good idea, unless there is no other way 
around it.

[1] http://labs.frickle.com/nginx_ngx_slowfs_cache/

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >
 




More information about the nginx-devel mailing list