summaryrefslogtreecommitdiffhomepage
path: root/src/os/win32 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-31Fixed ngx_pid_t formatting in ngx_sprintf() and logging.Sergey Kandaurov2-7/+7
2016-03-30Style.Ruslan Ermilov2-9/+9
2016-03-29Win32: replaced NGX_EXDEV with more appropriate error code.Maxim Dounin1-5/+1
Correct error code for NGX_EXDEV on Windows is ERROR_NOT_SAME_DEVICE, "The system cannot move the file to a different disk drive". Previously used ERROR_WRONG_DISK is about wrong diskette in the drive and is not appropriate. There is no real difference though, as MoveFile() is able to copy files between disk drives, and will fail with ERROR_ACCESS_DENIED when asked to copy directories. The ERROR_NOT_SAME_DEVICE error is only used by MoveFileEx() when called without the MOVEFILE_COPY_ALLOWED flag.
2016-03-29Win32: additional error code NGX_EEXIST_FILE (ticket #910).Maxim Dounin1-1/+7
On Windows there are two possible error codes which correspond to the EEXIST error code: ERROR_FILE_EXISTS used by CreateFile(CREATE_NEW), and ERROR_ALREADY_EXISTS used by CreateDirectory(). MoveFile() seems to use both: ERROR_ALREADY_EXISTS when moving within one filesystem, and ERROR_FILE_EXISTS when copying a file to a different drive.
2016-02-18Core: added support for more than 64 CPUs in worker_cpu_affinity.Vladimir Homutov1-0/+3
2016-02-04Dynamic modules: dlopen() support.Maxim Dounin2-0/+54
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin1-9/+9
2015-08-17Win32: MSVC 2015 compatibility.Maxim Dounin2-2/+7
Resolved warnings about declarations that hide previous local declarations. Warnings about WSASocketA() being deprecated resolved by explicit use of WSASocketW() instead of WSASocket(). When compiling without IPv6 support, WinSock deprecated warnings are disabled to allow use of gethostbyname().
2015-08-11Core: idle connections now closed only once on exiting.Valentin Bartenev1-18/+4
Iterating through all connections takes a lot of CPU time, especially with large number of worker connections configured. As a result nginx processes used to consume CPU time during graceful shutdown. To mitigate this we now only do a full scan for idle connections when shutdown signal is received. Transitions of connections to idle ones are now expected to be avoided if the ngx_exiting flag is set. The upstream keepalive module was modified to follow this.
2015-06-16Core: added support for writing to stdout.Vladimir Homutov1-0/+1
2015-05-20Introduced worker number, ngx_worker.Maxim Dounin2-0/+2
2015-04-27Win32: shared memory base addresses and remapping.Maxim Dounin3-2/+84
Two mechanisms are implemented to make it possible to store pointers in shared memory on Windows, in particular on Windows Vista and later versions with ASLR: - The ngx_shm_remap() function added to allow remapping of a shared memory zone to the address originally used for it in the master process. While important, it doesn't solve the problem by itself as in many cases it's not possible to use the address because of conflicts with other allocations. - We now create mappings at the same address in all processes by starting mappings at predefined addresses normally unused by newborn processes. These two mechanisms combined allow to use shared memory on Windows almost without problems, including reloads. Based on the patch by Sergey Brester: http://mailman.nginx.org/pipermail/nginx-devel/2015-April/006836.html
2015-03-26Replaced the remaining NGX_OLD_THREADS check with NGX_WIN32.Ruslan Ermilov1-2/+0
2015-03-26Removed "worker_threads" and "thread_stack_size" directives.Ruslan Ermilov3-41/+1
2015-03-26Removed unused thread-local-storage code.Ruslan Ermilov3-40/+0
2015-03-26Removed ngx_threaded and related code.Ruslan Ermilov2-2/+0
2015-03-23Removed stub implementation of win32 mutexes.Ruslan Ermilov2-62/+0
2015-03-04Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation.Ruslan Ermilov1-1/+1
It's mostly dead code and the original idea of worker threads has been rejected.
2015-03-17Core: expose maximum values of time_t and ngx_int_t.Ruslan Ermilov1-0/+2
These are needed to detect overflows.
2014-11-19Renamed ngx_handle_sent_chain() to ngx_chain_update_sent().Valentin Bartenev1-2/+2
No functional changes.
2014-08-13Events: introduced cancelable timers.Valentin Bartenev1-0/+2
2014-10-15Win32: made build-able with MinGW-w64 gcc.Kouhei Sutou1-2/+35
2014-10-28Core: added limit to recv_chain().Roman Arutyunyan2-7/+20
2014-10-14Style.Maxim Dounin1-1/+2
2014-10-11Win32: suppressed warnings by "-Werror=sign-compare".Kouhei Sutou1-2/+2
2014-08-13Reduced difference between the send chain functions.Valentin Bartenev1-9/+7
No functional changes. This follows the change from ad137a80919f.
2014-08-13Removed the "complete" variable from various send chain functions.Valentin Bartenev1-7/+1
It was made redundant by the previous change, since the "sent" variable is no longer modified.
2014-08-13Moved the code for adjusting sent buffers in a separate function.Valentin Bartenev1-45/+2
2014-08-03Style: use ngx_free() instead of free().Tatsuhiko Kubo1-1/+1
2014-07-08Style: keep return type and function name on different lines.Piotr Sikora1-3/+6
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08Style: add whitespace between control statement and parentheses.Piotr Sikora1-1/+1
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-05Win32: ngx_open_dir() and ngx_close_dir() fixes.Maxim Dounin2-1/+14
The ngx_open_dir() function changed to restore name passed to it. This fixes removing destination directory in dav module, as caught by dav.t. The ngx_close_dir() function introduced to properly convert errors, as FindClose() returns 0 on error.
2014-05-20Configure: the --build= option.Ruslan Ermilov1-1/+1
If set, its value is output in "nginx -v" and in the error log.
2014-03-31Win32: fixed cpu hog by cache manager on exit (ticket #514).Maxim Dounin1-3/+3
The "ngx_quit" may be reset by the worker thread before it's seen by a ngx_cache_manager_thread(), resulting in an infinite loop. Make sure to test ngx_exiting as well.
2014-03-06Added connection serial number in logging of left open sockets.Sergey Kandaurov1-2/+2
2014-02-13Win32: MSVC 2013 compatibility.Maxim Dounin1-0/+8
Warnings about GetVersionEx() deprecation silenced. Precompiled object linked in.
2014-01-30Core: handle getsockopt(TCP_FASTOPEN) failures.Piotr Sikora1-0/+1
Linux returns EOPNOTSUPP for non-TCP sockets and ENOPROTOOPT for TCP sockets, because getsockopt(TCP_FASTOPEN) is not implemented so far. While there, lower the log level from ALERT to NOTICE to match other getsockopt() failures. Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-01-04Win32: support for UTF-16 surrogate pairs (ticket #457).Maxim Dounin1-2/+21
2014-01-04Added per-process random seeding (ticket #456).Maxim Dounin1-1/+1
2013-11-29Win32: fixed init_process without master process (ticket #453).Maxim Dounin1-10/+0
Init process callbacks are called by ngx_worker_thread(), there is no need to call them in ngx_single_process_cycle().
2013-10-31Win32: plugged memory leak.Maxim Dounin1-0/+2
2013-10-31Core: handling of getsockopt(TCP_DEFER_ACCEPT) failures.Maxim Dounin1-0/+1
Recent Linux versions started to return EOPNOTSUPP to getsockopt() calls on unix sockets, resulting in log pollution on binary upgrade. Such errors are silently ignored now.
2013-09-23Added ngx_filename_cmp() with "/" sorted to the left.Maxim Dounin2-6/+5
This patch fixes incorrect handling of auto redirect in configurations like: location /0 { } location /a- { } location /a/ { proxy_pass ... } With previously used sorting, this resulted in the following locations tree (as "-" is less than "/"): "/a-" "/0" "/a/" and a request to "/a" didn't match "/a/" with auto_redirect, as it didn't traverse relevant tree node during lookup (it tested "/a-", then "/0", and then falled back to null location). To preserve locale use for non-ASCII characters on case-insensetive systems, libc's tolower() used.
2013-09-04Win32: MinGW GCC compatibility.Maxim Dounin5-6/+14
Several warnings silenced, notably (ngx_socket_t) -1 is now checked on socket operations instead of -1, as ngx_socket_t is unsigned on win32 and gcc complains on comparison. With this patch, it's now possible to compile nginx using mingw gcc, with options we normally compile on win32.
2013-09-04Win32: Borland C compatibility fixes.Maxim Dounin1-0/+8
Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-04Win32: Open Watcom C compatibility fixes.Maxim Dounin1-0/+14
Precompiled headers are disabled as they lead to internal compiler errors with long configure lines. Couple of false positive warnings silenced. Various win32 typedefs are adjusted to work with Open Watcom C 1.9 headers. With this patch, it's now again possible to compile nginx using owc386, with options we normally compile on win32 minus ipv6 and ssl.
2013-09-02Added the NGX_EBADF define.Valentin Bartenev1-0/+1
2013-07-30Autoindex: improved ngx_de_info() error handling.Sergey Kandaurov1-0/+1
This allows to build a directory listing whenever a loop exists in symbolic link resolution of the path argument.
2013-07-05Make macros safe.Gleb Smirnoff1-3/+3
2013-05-29Win32: added missing reset of wev->ready on WSAEWOULDBLOCK.Maxim Dounin1-0/+1
This fixes connection hang with websockets proxy, and likely some other places as well.