error_log cannot be reopened when kill a USR1 signal

任晓磊 julyclyde at gmail.com
Sat Oct 10 10:48:16 MSD 2009


2009/10/10 Igor Sysoev <is at rambler-co.ru>:
> nginx should keep open two error.log files, one of them is stderr
> redirection, and its files descriptor number is always 2:
>
> l-wx------  1 root root 64 Oct  9 11:08 2 -> /usr/local/nginx/logs/error.log
>
> Could you post the current open files state ?
So,it works correctly now.

# ls -l /proc/30999/fd
total 14
lrwx------  1 root root 64 Oct 10 10:14 0 -> /dev/null
lrwx------  1 root root 64 Oct 10 10:14 1 -> /dev/null
lrwx------  1 root root 64 Oct 10 10:14 10 -> socket:[54758664]
lrwx------  1 root root 64 Oct 10 10:14 11 -> socket:[54758665]
lrwx------  1 root root 64 Oct 10 10:14 12 -> socket:[54758667]
lrwx------  1 root root 64 Oct 10 10:14 13 -> socket:[54758668]
l-wx------  1 root root 64 Oct 10 10:14 14 ->
/usr/local/nginx/logs/host.access.log
l-wx------  1 root root 64 Oct 10 10:14 2 -> /usr/local/nginx/logs/error.log
lrwx------  1 root root 64 Oct 10 10:14 3 -> socket:[54758658]
l-wx------  1 root root 64 Oct 10 10:14 4 -> /usr/local/nginx/logs/error.log
lrwx------  1 root root 64 Oct 10 10:14 6 -> socket:[54758656]
lrwx------  1 root root 64 Oct 10 10:14 7 -> socket:[54758659]
lrwx------  1 root root 64 Oct 10 10:14 8 -> socket:[54758661]
lrwx------  1 root root 64 Oct 10 10:14 9 -> socket:[54758662]


-- 
Ren Xiaolei





More information about the nginx mailing list