| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Solaris has AT_FDCWD defined to unsigned value, and comparison of a file
descriptor with it causes warnings in modern versions of gcc. Explicitly
cast AT_FDCWD to ngx_fd_t to resolve these warnings.
|
| |
|
|
|
|
|
| |
This inaccurate detection by using sysconf(_SC_NPROCESSORS_ONLN) can improve
usage of the mutex lock optimization on multicore systems.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Requested by Igor Sysoev.
|
|
|
|
|
|
|
|
| |
If process exited abnormally while holding lock on some shared memory zone -
unlock it. It may be not safe thing to do (as crash with lock held may
result in corrupted shared memory structure, and other processes will
subsequently crash while trying to access shared data), therefore complain
loudly if unlock succeeds.
|
|
|
|
|
|
|
|
|
|
|
| |
It is currently used from master process on abnormal worker termination to
unlock accept mutex (unlocking of accept mutex was broken in 1.0.2). It is
expected to be used in the future to unlock other mutexes as well.
Shared mutex code was rewritten to make this possible in a safe way, i.e.
with a check if lock was actually held by the exited process. We again use
pid to lock mutex, and use separate atomic variable for a count of processes
waiting in sem_wait().
|
|
|
|
|
|
| |
A fix for the broken build applied.
Patch from Igor Sysoev.
|
|
|
|
|
| |
for output of ./configure options, etc., since ngx_log_stderr() output
length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
|
| |
|
| |
|
|
|
|
|
| |
Previous patch missed special case for one iovec, it needs total bytes
written to be returned as well.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixed nearby grammar errors.
|
|
|
|
|
|
|
| |
syscall(2) uses usual libc convention, it returns -1 on error and
sets errno. Obsolete _syscall(2) returns negative value of error.
Thanks to Hagai Avrahami.
|
|
|
|
|
| |
in favour of their CommonCrypto library. This change adds a work-around
that allows nginx to still be built on Lion with OpenSSL.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
patch by Maxim Dounin
|
|
|
|
| |
number of spinlock spins are increased twice
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
thanks to Andrei Nigmatulin
|
|
|
|
| |
patch by Andrei Nigmatulin
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
*) change ngx_time_update() interface
|
|
|
|
|
| |
*) change ngx_time_update() interface since there are no notification methods
those return time
|
|
|
|
| |
of non Async-Signal-Safe strerror_r()
|
|
|
|
| |
dereferencing type-punned pointer will break strict-aliasing rules
|
| |
|
| |
|