ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Stop write log after have a problems for write(3).



From: Kirill A. Korinskiy <catap@xxxxxxxx>

Now we have a some issue ? the I/O is a sync operation and we blocking
every time to try write to full partition. This patch stop write a log
after first problem.
---
 src/core/ngx_log.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index f1718f1..6829d77 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -150,7 +150,10 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, 
ngx_err_t err,
 
     ngx_linefeed(p);
 
-    (void) ngx_write_fd(log->file->fd, errstr, p - errstr);
+    if (ngx_write_fd(log->file->fd, errstr, p - errstr)
+        == -1) {
+        log->file->fd = NGX_INVALID_FILE;
+    }
 }
 
 
-- 
1.6.2




 




Copyright © Lexa Software, 1996-2009.