lighttpd1.4/src
Kyle J. McKay c92b1762ba [core] truncate pidfile on exit (fixes #2695)
If the server has changed its uid or is running in a chroot
it may be unable to remove the pid file when it exits.

However, if it holds on to an open handle to the pid file
that has write permission, it will be able to truncate the
pid file to 0 bytes in length.

Most monitoring software recognizes a 0-length pid file
as indicating there is no process running.

Therefore always attempt to truncate the pid file before
trying to remove it so that it's not left containing the
pid of a process that is no longer running.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3112 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-03-19 15:01:23 +00:00
..
CMakeLists.txt use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
Makefile.am use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
SConscript use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
array.c [core] provide array_extract_element and use it 2016-03-15 18:56:02 +00:00
array.h [core] provide array_extract_element and use it 2016-03-15 18:56:02 +00:00
base.h [core] fix conditional cache handling 2016-02-21 18:32:14 +00:00
base64.c [core] refactor base64 functions into separate file 2015-11-22 22:22:20 +00:00
base64.h [core] refactor base64 functions into separate file 2015-11-22 22:22:20 +00:00
buffer.c [buffer] use explicit integer promotion to make the code more readable 2016-02-23 16:28:48 +00:00
buffer.h [mod_auth] implement and use safe_memclear, using memset_s or explicit_bzero if available 2015-09-26 10:11:24 +00:00
chunk.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
chunk.h [core] revert increase of temp file size back to 1MB, provide a configure option "server.upload-temp-file-size" instead (fixes #2680) 2015-11-07 12:51:14 +00:00
config.h.cmake use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
configfile-glue.c [core] fix conditional cache handling 2016-02-21 18:32:14 +00:00
configfile.c [core] improve array API to prevent theoretical memory leaks 2016-03-15 18:26:57 +00:00
configfile.h [core] improve conditional enabling (thx Gwenlliana, #2598) 2016-02-21 18:32:17 +00:00
configparser.y [core] configparser: error on duplicate keys in array merge (fixes #2685) 2016-03-15 18:56:05 +00:00
connections-glue.c Fix some problems with more strict compilers (#1923) 2009-03-07 13:54:10 +00:00
connections.c [core] fix request_start in keep-alive requests to mark time when received first byte (fixes #2412) 2016-03-19 15:01:21 +00:00
connections.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
crc32.c [crc32] fix method signature (const pointer) 2015-02-08 19:10:56 +00:00
crc32.h [crc32] fix method signature (const pointer) 2015-02-08 19:10:56 +00:00
data_array.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
data_config.c [core] fix conditional cache handling 2016-02-21 18:32:14 +00:00
data_count.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
data_fastcgi.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
data_integer.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
data_string.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
etag.c check pointer before usage in new etag compare 2015-07-05 20:19:17 +00:00
etag.h parse If-None-Match for ETag validation (fixes #2578) 2015-07-05 16:59:01 +00:00
fastcgi.h - white space cleanup part 2 this time 1.4 ;) 2006-10-04 13:26:23 +00:00
fdevent.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
fdevent.h [bitset] unused -> remove 2015-02-08 19:10:51 +00:00
fdevent_freebsd_kqueue.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
fdevent_libev.c add force_assert() to enforce assertions as simple assert()s are disabled by -DNDEBUG (fixes #2546) 2014-02-16 13:08:20 +00:00
fdevent_linux_sysepoll.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
fdevent_poll.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
fdevent_select.c add force_assert() to enforce assertions as simple assert()s are disabled by -DNDEBUG (fixes #2546) 2014-02-16 13:08:20 +00:00
fdevent_solaris_devpoll.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
fdevent_solaris_port.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
http-header-glue.c [core] encode path with ENCODING_REL_URI in redirect to directory (fixes #2661, thx gstrauss) 2015-11-07 15:00:18 +00:00
http_auth.c [core] refactor base64 functions into separate file 2015-11-22 22:22:20 +00:00
http_auth.h [mod_auth] some cleanup, only search for matching auth.require path once 2013-08-30 13:14:54 +00:00
http_chunk.c rename buffer_append_long_hex to buffer_append_uint_hex 2015-02-08 19:10:46 +00:00
http_chunk.h fix buffer, chunk and http_chunk API 2015-02-08 12:37:10 +00:00
inet_ntop_cache.c Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
inet_ntop_cache.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
joblist.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
joblist.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
keyvalue.c cleanup dead keyvalue code 2016-01-30 13:59:10 +00:00
keyvalue.h cleanup dead keyvalue code 2016-01-30 13:59:10 +00:00
lemon.c fix/silence bugs reported by ccc-analyzer (clang) 2013-11-13 11:43:26 +00:00
lempar.c Use NULL instead of 0 where pointers are expected. 2012-08-31 14:11:43 +00:00
lighttpd-angel.c [lighttpd-angel] Remove unused variable. 2012-08-31 14:11:46 +00:00
log.c fix some unchecked return value warnings 2015-08-22 16:01:08 +00:00
log.h fix some unchecked return value warnings 2015-08-22 16:01:08 +00:00
md5.c [md5] Fix non-ANSI function definitions. 2012-08-31 14:11:42 +00:00
md5.h [ssl/md5] prefix our own md5 implementation with li_ so it doesn't conflict with the openssl one (fixes #2269) 2011-04-24 16:02:52 +00:00
mod_access.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_accesslog.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_alias.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_auth.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_auth.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
mod_cgi.c [mod_cgi] kill CGI if fail to write request body 2016-03-04 18:54:30 +00:00
mod_cml.c use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
mod_cml.h use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
mod_cml_funcs.c use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
mod_cml_funcs.h Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
mod_cml_lua.c use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
mod_compress.c [mod_compress] case-insensitive content-codings (fixes #2645) 2016-02-28 11:59:09 +00:00
mod_dirlisting.c [mod_dirlisting] dir-listing.hide-dotfiles = "enabled" by default (fixes #1081) 2016-03-04 19:46:29 +00:00
mod_evasive.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_evhost.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_expire.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_extforward.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_fastcgi.c [core] improve array API to prevent theoretical memory leaks 2016-03-15 18:26:57 +00:00
mod_flv_streaming.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_indexfile.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_magnet.c [mod_magnet] define lua_pushglobaltable (for lua5.1) and use it (fixes #2719) 2016-03-19 13:16:31 +00:00
mod_magnet_cache.c add handling for lua 5.2 and 5.3 (fixes #2674) 2016-01-03 14:48:09 +00:00
mod_magnet_cache.h lua_State has to be put into the #ifdef too 2006-09-15 15:32:18 +00:00
mod_mysql_vhost.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_proxy.c [mod_proxy] use case-insensitive comparision to filter headers, send Connection: Close to backend (fixes #421) 2016-03-04 19:23:16 +00:00
mod_redirect.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_rewrite.c [mod_rewrite] fix return type of process_rewrite_rules 2016-03-13 14:53:18 +00:00
mod_rrdtool.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_scgi.c [mod_fastcgi,mod_scgi] fix leaking file-descriptor when backend spawning failed (reported by Fortify Open Review Project) 2016-03-14 18:07:01 +00:00
mod_secdownload.c [mod_secdownload] fix buffer overflow in secdl_verify_mac (reported by Fortify Open Review Project) 2016-03-13 14:53:20 +00:00
mod_setenv.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_simple_vhost.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_skeleton.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_ssi.c [mod_ssi] enhance support for ssi vars 2016-01-03 14:48:07 +00:00
mod_ssi.h Add ssi.content-type option (default text/html, fixes #615) 2009-06-10 14:50:42 +00:00
mod_ssi_expr.c [mod_ssi] enhance support for ssi vars 2016-01-03 14:48:07 +00:00
mod_ssi_expr.h [mod_ssi] fix "ssi_val_init" prototype 2013-11-13 17:18:35 +00:00
mod_ssi_exprparser.y Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
mod_staticfile.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_status.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_trigger_b4_dl.c use libmemcached instead of deprecated libmemcache 2016-01-03 14:48:11 +00:00
mod_uploadprogress.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_userdir.c [mod_secdownload] add required algorithm option; old behaviour available as "md5", new options "hmac-sha1" and "hmac-sha256" 2015-11-22 22:22:22 +00:00
mod_usertrack.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
mod_webdav.c [config] check config option scope; warn if server option is given in conditional 2015-11-07 12:51:11 +00:00
network.c [ssl] support disabling ssl.verifyclient.activate in SNI callback (fixes #2531) 2016-03-19 13:27:13 +00:00
network.h Limit amount of bytes we send in one go; fixes stalling in one connection and timeouts on slow systems. 2011-08-22 15:12:28 +00:00
network_backends.h [network] add darwin-sendfile backend (fixes #2687) 2015-12-04 20:48:21 +00:00
network_darwin_sendfile.c [network] add darwin-sendfile backend (fixes #2687) 2015-12-04 20:48:21 +00:00
network_freebsd_sendfile.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_linux_sendfile.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_openssl.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_solaris_sendfilev.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_write.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_write_mmap.c [mmap] handle SIGBUS in network; those get triggered if the file gets smaller during reading 2015-08-29 12:23:42 +00:00
network_write_no_mmap.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
network_writev.c rewrite network (write) backends 2015-08-22 16:00:59 +00:00
plugin.c [plugins] don't include dlfcn.h if not needed (fixes #2548) 2016-02-28 12:12:05 +00:00
plugin.h [core] improve conditional enabling (thx Gwenlliana, #2598) 2016-02-21 18:32:17 +00:00
proc_open.c Use buffer API to read and modify "used" member 2015-02-08 19:10:44 +00:00
proc_open.h Fix leaving zombie process with include_shell (#1777) 2008-09-30 19:42:29 +00:00
request.c Use buffer API to read and modify "used" member 2015-02-08 19:10:44 +00:00
request.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
response.c [core] improve conditional enabling (thx Gwenlliana, #2598) 2016-02-21 18:32:17 +00:00
response.h Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
safe_memclear.c [core] fix memset_s call (fixes #2698) 2015-12-18 21:56:59 +00:00
safe_memclear.h [mod_auth] implement and use safe_memclear, using memset_s or explicit_bzero if available 2015-09-26 10:11:24 +00:00
server.c [core] truncate pidfile on exit (fixes #2695) 2016-03-19 15:01:23 +00:00
server.h remove unused stuff from server.h 2015-02-08 19:10:53 +00:00
settings.h [mod_auth] implement and use safe_memclear, using memset_s or explicit_bzero if available 2015-09-26 10:11:24 +00:00
splaytree.c Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
splaytree.h - white space cleanup part 2 this time 1.4 ;) 2006-10-04 13:26:23 +00:00
stat_cache.c add force_assert for more allocation results 2016-01-30 13:59:07 +00:00
stat_cache.h cleanup fdevent code, removed linux-rtsig handler, replaced some fprintf calls 2010-08-06 21:57:15 +00:00
status_counter.c Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
status_counter.h Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00
stream.c [configfile] fix reading uninitialized variable (found by Willian B.) 2015-07-19 10:03:12 +00:00
stream.h moved everything below trunk/ and added branches/ and tags/ 2005-02-20 14:27:00 +00:00
sys-mmap.h rewrite network (write) backends 2015-08-22 16:00:59 +00:00
sys-socket.h ECONNABORTED is not known on cygwin (fixes #863) 2007-04-09 20:31:03 +00:00
version.h Fix header inclusion order, always include "config.h" before any system header 2009-10-11 14:31:42 +00:00