aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix
Commit message (Collapse)AuthorAge
...
* Fixed loop in ngx_writev_chain() and ngx_solaris_sendfilev_chain().Maxim Dounin2012-04-17
| | | | | | | The "complete" flag wasn't cleared on loop iteration start, resulting in broken behaviour if there were more than IOV_MAX buffers and first iteration was fully completed (and hence the "complete" flag was set to 1).
* Style: the function type should be on a line by itselfMaxim Konovalov2012-04-05
| | | | preceding the function. No functional changes.
* Fixed spelling in multiline C comments.Ruslan Ermilov2012-04-03
|
* Fixed unconditional MAX_PATH usage (ticket #22).Maxim Dounin2012-03-27
| | | | | | POSIX doesn't require it to be defined, and Debian GNU/Hurd doesn't define it. Note that if there is no MAX_PATH defined we have to use realpath() with NULL argument and free() the result.
* Added explicit include of time.h.Maxim Dounin2012-03-27
| | | | | | Most of the systems have it included due to namespace pollution, but relying on this is a bad idea. Explicit include is required for at least Debian GNU/Hurd.
* worker_cpu_affinity: cleaned up Linux implementation, added FreeBSD support.Ruslan Ermilov2012-03-21
|
* Whitespace fixes.Maxim Dounin2012-03-05
|
* Added msleep() on reload to allow new processes to start.Maxim Dounin2012-02-28
| | | | | | | This is expected to ensure smoother operation on reload (and with less chance of listen queue overflows). Prodded by Igor Sysoev.
* Fixed spelling in single-line comments.Ruslan Ermilov2012-02-28
|
* Workaround for fs_size on ZFS (ticket #46).Maxim Dounin2012-02-28
| | | | | | | | | | 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).
* Disable symlinks: use O_SEARCH|O_DIRECTORY to open path components.Valentin Bartenev2012-02-21
|
* Disable symlinks: added explicit cast of AT_FDCWD (ticket #111).Maxim Dounin2012-02-20
| | | | | | 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.
* Added openat()/fstatat().Andrey Belov2012-02-13
|
* Added ngx_ncpu detection for most *nix platforms.Valentin Bartenev2012-02-10
| | | | | This inaccurate detection by using sysconf(_SC_NPROCESSORS_ONLN) can improve usage of the mutex lock optimization on multicore systems.
* Fixed AIO error handling on FreeBSD.Maxim Dounin2012-01-30
| | | | | | | | | 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.
* Copyright updated.Maxim Konovalov2012-01-18
|
* Fixed sched_setaffinity(2) to correctly pass size.Maxim Dounin2012-01-16
| | | | | | 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.
* Microoptimization of sendfile(2) usage under FreeBSD.Maxim Dounin2011-12-11
| | | | | | | 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.
* Added (void) as we intentionally ignore returned values.Maxim Dounin2011-11-28
| | | | Requested by Igor Sysoev.
* Unlock of shared memory zones on process crash.Maxim Dounin2011-11-23
| | | | | | | | 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.
* Added shmtx interface to forcibly unlock mutexes.Maxim Dounin2011-11-23
| | | | | | | | | | | 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().
* FreeBSD 10-current has recently gotten POSIX_FADV_* macros.Maxim Konovalov2011-11-18
| | | | | | A fix for the broken build applied. Patch from Igor Sysoev.
* Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()Igor Sysoev2011-11-14
| | | | | for output of ./configure options, etc., since ngx_log_stderr() output length is limited by 2048 characters defined as NGX_MAX_ERROR_STR.
* Fixed range checking for the "somaxconn" sysctl.Ruslan Ermilov2011-10-25
|
* malloc() debugging on MacOSX.Igor Sysoev2011-10-24
|
* Fixed another return in unix ngx_write_chain_to_file().Maxim Dounin2011-10-21
| | | | | Previous patch missed special case for one iovec, it needs total bytes written to be returned as well.
* Fixed unix ngx_write_chain_to_file() to return total bytes written.Maxim Dounin2011-10-20
| | | | | | 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.
* Replaced "can not" with "cannot" and "could not" in a bunch of places.Ruslan Ermilov2011-09-19
| | | | Fixed nearby grammar errors.
* Fixing Linux AIO syscalls return value handling:Igor Sysoev2011-09-16
| | | | | | | 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 Mac OS X Lion, Apple deprecated the use of the system OpenSSL libraryRuslan Ermilov2011-09-13
| | | | | in favour of their CommonCrypto library. This change adds a work-around that allows nginx to still be built on Lion with OpenSSL.
* Bugfix: open_file_cache lost is_directio flag.Maxim Dounin2011-09-05
| | | | | | 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.
* SIGWINCH/NOACCEPT signal is disabled now in non-daemon mode.Igor Sysoev2011-08-22
| | | | | | | 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.
* Move SO_ACCEPTFILTER and TCP_DEFER_ACCEPT checks into configure.Maxim Dounin2011-08-21
| | | | | | | 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).
* elimination of reading cache files by cache loaderIgor Sysoev2011-07-24
|
* "$apr1", "{PLAIN}", and "{SSHA}" password methods in auth basic moduleIgor Sysoev2011-05-16
| | | | patch by Maxim Dounin
* use POSIX semaphores in shmtx instead of sched_yield()Igor Sysoev2011-05-10
| | | | number of spinlock spins are increased twice
* revert r3864, it may cause kernel panic on some kernels while working with IPv6Igor Sysoev2011-04-23
|
* Use more precise stat.st_blocks to account cache size on UnixIgor Sysoev2011-04-22
| | | | | 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.
* use backlog -1 on LinuxIgor Sysoev2011-02-17
| | | | thanks to Andrei Nigmatulin
* set current atime while setting mtimeIgor Sysoev2011-02-11
| | | | patch by Andrei Nigmatulin
* allow "env" to work in the single process modeIgor Sysoev2010-12-13
|
* allocate last zero byte in ngx_crypt()Igor Sysoev2010-11-29
|
* use copied strerror() messages and autoconfigured sys_nerr valueIgor Sysoev2010-11-25
|
* Linux accept4() supportIgor Sysoev2010-11-25
|
* update event flags after successful io_submit()Igor Sysoev2010-10-12
|
* worker_rlimit_core should be off_tIgor Sysoev2010-09-15
|
* fix typoIgor Sysoev2010-07-08
|
* style fixIgor Sysoev2010-07-08
|
* HP/UX uses EWOULDBLOCK instead of EAGAINIgor Sysoev2010-07-03
|
* fix ngx_write_file() bufIgor Sysoev2010-06-30
|