summaryrefslogtreecommitdiffhomepage
path: root/src/os (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-05Merge of r4500: fixed spelling in single-line comments.Maxim Dounin4-4/+4
2012-03-05Merge of r4499: workaround for fs_size on ZFS (ticket #46).Maxim Dounin1-2/+3
ZFS reports incorrect st_blocks until file settles on disk, and this may take a while (i.e. just after creation of a file the st_blocks value is incorrect). As a workaround we now use st_blocks only if st_blocks * 512 > st_size, this should fix ZFS problems while still preserving accuracy for other filesystems. The problem had appeared in r3900 (1.0.1).
2012-03-05Merge of r4460: ngx_ncpu detection for most *nix platforms.Maxim Dounin1-0/+6
This inaccurate detection by using sysconf(_SC_NPROCESSORS_ONLN) can improve usage of the mutex lock optimization on multicore systems.
2012-02-05Merge of r4416:Maxim Dounin1-18/+9
Fixed AIO error handling on FreeBSD. The aio_return() must be called regardless of the error returned by aio_error(). Not calling it resulted in various problems up to segmentation faults (as AIO events are level-triggered and were reported again and again). Additionally, in "aio sendfile" case r->blocked was incremented in case of error returned from ngx_file_aio_read(), thus causing request hangs.
2012-02-05Merge of r4406, r4413: copyrights updated.Maxim Dounin100-0/+100
2012-02-05Merge of r4404:Maxim Dounin1-1/+4
Fixed sched_setaffinity(2) to correctly pass size. Second argument (cpusetsize) is size in bytes, not in bits. Previously used constant 32 resulted in reading of uninitialized memory and caused EINVAL to be returned on some Linux kernels.
2012-02-05Merge r4336:Maxim Dounin1-2/+7
Microoptimization of sendfile(2) usage under FreeBSD. FreeBSD kernel checks headers/trailers pointer against NULL, not corresponding count. Passing NULL if there are no headers/trailers helps to avoid unneeded work in kernel, as well as unexpected 0 bytes GIO in traces.
2011-12-14Merge of r4284:Maxim Dounin2-0/+2
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr() for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
2011-12-14Merge of r4231, r4300, r4303, r4304:Maxim Dounin1-1/+1
Configure/build changes and fixes: *) Revamped "configure --help" text. *) FreeBSD 10-current has recently gotten POSIX_FADV_* macros. A fix for the broken build applied. *) AIX 7 defines sys_nerr in errno.h, therefore <errno.h> included in the sys_nerr test. When sys_nerr and _sys_nerr are missed on a particular platform and our euristic for a maximum errno detection applied always print the maximum errno number we reached instead of printing void. This makes possible to build nginx on AIX 7.1. *) Made it possible to build/install from the SVN checkout.
2011-12-14Merge of r4227, r4228:Maxim Dounin2-12/+5
Fixed range checking for the "somaxconn" sysctl. Fixed port range checking.
2011-12-13Merge of r4221, r4222:Maxim Dounin1-4/+14
Fixed unix ngx_write_chain_to_file() to return total bytes written. Previously result of last iteration's writev() was returned. This was unnoticed as return value was only used if chain contained only one or two buffers.
2011-11-01Merging r4155, r4219, r4220, r4230:Igor Sysoev1-2/+5
Windows related fixes: *) Fixed segmentation fault with empty config on Windows. See here for report: http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html *) Recent SDKs allow to build IPV6 only for Windows XP or above. *) Fixing conflict with SDK off_t definition. *) Fix of building by Microsoft Visual C++ 10 compiler.
2011-11-01Merging r4132, r4134, r4143, r4183, r4191, r4199:Igor Sysoev6-6/+7
Various fixes related to error messages: *) Removed old warning that suggested to use "server_name_in_redirect off" (now the default) in place of no longer supported "server_name *". *) Fixing directive name in error message if types hash size is not enough. *) Replaced "can not" with "cannot" and "could not" in a bunch of places. Fixed nearby grammar errors. *) Overhauled error messages.
2011-11-01Merging r4020:Igor Sysoev1-2/+7
SIGWINCH/NOACCEPT signal is disabled now in non-daemon mode. Non-daemon mode is currently used by supervisord, daemontools and so on or during debugging. The NOACCEPT signal is only used for online upgrade which is not supported when nginx is run under supervisord, etc., so this change should not break existant setups.
2011-11-01Merging r4017:Igor Sysoev2-10/+0
Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure. NetBSD 5.0+ has SO_ACCEPTFILTER support merged from FreeBSD, and having accept filter check in FreeBSD-specific ngx_freebsd_config.h prevents it from being used on NetBSD. Therefore move the check into configure (and do the same for Linux-specific TCP_DEFER_ACCEPT, just to be in line).
2011-09-30Merging r4130, r4131, r4135:Igor Sysoev1-9/+7
Linux AIO related fixes: *) Fixing Linux AIO syscalls return value handling: syscall(2) uses usual libc convention, it returns -1 on error and sets errno. Obsolete _syscall(2) returns negative value of error. *) Fixing Linux AIO initiatialization: AIO operations are disabled if kernel does not support them. Previously worker just exited. *) The "worker_aio_requests" directive. The default value is 32 AIO simultaneous requests per worker. Previously they were hardcoded to 1024, and it was too large, since Linux allocated them early on io_setup(), but not on request itself. So with default value of /proc/sys/fs/aio-max-nr equal to 65536 only 64 worker processes could be run simultaneously. 32 AIO requests are enough for modern disks even if server runs only 1 worker.
2011-09-30Merging r4098:Igor Sysoev1-0/+2
In Mac OS X Lion, Apple deprecated the use of the system OpenSSL library in favour of their CommonCrypto library. This change adds a work-around that allows nginx to still be built on Lion with OpenSSL.
2011-09-30Merging r4077, r4101, r4102:Igor Sysoev2-0/+7
open_file_cache related fixes: *) Bugfix: open_file_cache lost is_directio flag. On file retest open_file_cache lost is_directio if file wasn't changed. This caused unaligned operations under Linux to fail with EINVAL. It wasn't noticeable with AIO though, as errors wasn't properly logged. *) Bugfix: open_file_cache did not update file info on retest. If file inode was not changed, cached file information was not updated on retest. As a result stale information might be cached forever if file attributes was changed and/or file was extended.
2011-08-29Merge of r4018:Igor Sysoev1-1/+2
Fix buffer overrun under Windows.
2011-08-29Merge of r3966, r3967, r3968, r3969, r3970, r3971:Igor Sysoev2-0/+2
Cache loader improvements: The cache loader performs two tasks: inserting cache objects in inactivity list and evaluating total cache size. Reading just directory is enough for this purpose. Elimination of reading cache files saves at least one disk I/O operation per file.
2011-05-16"$apr1", "{PLAIN}", and "{SSHA}" password methods in auth basic moduleIgor Sysoev4-5/+5
patch by Maxim Dounin
2011-05-10use POSIX semaphores in shmtx instead of sched_yield()Igor Sysoev5-0/+25
number of spinlock spins are increased twice
2011-04-23revert r3864, it may cause kernel panic on some kernels while working with IPv6Igor Sysoev1-1/+1
2011-04-22Use more precise stat.st_blocks to account cache size on UnixIgor Sysoev2-0/+2
instead of file length rounded to a file system block size. There is no similar way on Windows, so rounding to a cache->bsize is kept.
2011-02-17use backlog -1 on LinuxIgor Sysoev1-1/+1
thanks to Andrei Nigmatulin
2011-02-11set current atime while setting mtimeIgor Sysoev1-1/+1
patch by Andrei Nigmatulin
2011-01-20use SwitchToThread() instead of Sleep(0), because the laterIgor Sysoev1-1/+1
may not yield control, if there is no thread with higher priority
2010-12-13allow "env" to work in the single process modeIgor Sysoev1-0/+5
2010-11-29allocate last zero byte in ngx_crypt()Igor Sysoev1-4/+4
2010-11-25use copied strerror() messages and autoconfigured sys_nerr valueIgor Sysoev5-65/+75
2010-11-25Linux accept4() supportIgor Sysoev1-1/+1
2010-10-12update event flags after successful io_submit()Igor Sysoev1-0/+4
2010-09-15worker_rlimit_core should be off_tIgor Sysoev1-2/+2
2010-09-02add "Global\" prefix for signal eventsIgor Sysoev1-9/+11
2010-07-08fix typoIgor Sysoev1-1/+1
2010-07-08style fixIgor Sysoev1-4/+4
2010-07-05fix building by owc12: GetLongPathName() is available since Win2K onlyIgor Sysoev1-1/+1
2010-07-03HP/UX uses EWOULDBLOCK instead of EAGAINIgor Sysoev1-1/+5
2010-06-30fix ngx_write_file() bufIgor Sysoev1-2/+2
2010-06-29ngx_create_file_mapping()Igor Sysoev4-0/+172
2010-06-23style fixIgor Sysoev4-8/+8
2010-06-14do not free() stack allocated bufferIgor Sysoev1-1/+0
2010-04-22use lstat() for WebDAV DELETE, COPY, and MOVE to handle symlinksIgor Sysoev2-0/+7
2010-04-21use non-blocking open() not to hang on FIFO files, etc.Igor Sysoev2-0/+2
2010-03-26use "rep; nop" instead of "pause" on Solaris/amd64Igor Sysoev1-1/+6
2010-03-25*) introduce ngx_time_sigsafe_update() to update the error log time onlyIgor Sysoev4-12/+12
*) change ngx_time_update() interface
2010-03-13*) use previously cached GMT offset value to update time from a signal handlerIgor Sysoev4-12/+12
*) change ngx_time_update() interface since there are no notification methods those return time
2010-03-12use sys_errlist[] in signal handler insteadIgor Sysoev2-6/+19
of non Async-Signal-Safe strerror_r()
2010-03-03compare long file names in case-insensitive mode,Igor Sysoev3-1/+5
the bug had been introduced in r3418
2010-01-28disable Win32 short file namesIgor Sysoev1-14/+50