]> git.kaiwu.me - nginx.git/commitdiff
Cygwin can not pass SCM_RIGHTS via unix socket, use signals
authorIgor Sysoev <igor@sysoev.ru>
Thu, 18 Oct 2007 11:28:21 +0000 (11:28 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 18 Oct 2007 11:28:21 +0000 (11:28 +0000)
src/os/unix/ngx_posix_config.h
src/os/unix/ngx_process_cycle.c

index 9898de0d04996b59d4ace8d7c9d3512500fabc97..49c3c4d6c0f5e768a84d205292bfe0074bcbb862 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifdef __CYGWIN__
 #define timezonevar             /* timezone is variable */
+#define NGX_BROKEN_SCM_RIGHTS   1
 #endif
 
 
index 4705f395179e4cde9ac95fd66c213db421354d5d..631597ef45f19f2e850746b695d59ff98181bb1f 100644 (file)
@@ -409,6 +409,12 @@ ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo)
     ngx_err_t      err;
     ngx_channel_t  ch;
 
+#if (NGX_BROKEN_SCM_RIGHTS)
+
+    ch.command = 0;
+
+#else
+
     switch (signo) {
 
     case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
@@ -427,6 +433,8 @@ ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo)
         ch.command = 0;
     }
 
+#endif
+
     ch.fd = -1;