buildroot/package/apache
Nicolas Carrier 67fbb903b6 package/apache: atomic creation of pid file.
The original pattern for creating the pid file was:
open_create(pid_file)
write(pid_file, pid)
close(pid_file)

But if a power outage occurs between open_create and write, the file will
be empty and httpd will refuse to start afterwards unless the corrupt pid
file is removed.

This patch uses the pattern:
open_create(temp_pid_file)
write(temp_pid_file)
close(temp_pid_file)
rename(temp_pid_file, pid_file)
which is guaranteed to be atomic, provided that temp_pid_file and pid_file
are located in the same file system, which this patch does by creating
a temporary file name with the pattern:
    pid_file_name + random_suffix

Patch is upstream as of
dd10a9352e,
which will be in the next 2.5.x version.

Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>
[Thomas: update to use upstreamed patch.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-13 11:06:09 +02:00
..
0001-cross-compile.patch
0002-nios2_is_not_os2.patch
0003-server-Makefile.in-handle-separate-APR_INCLUDE_DIR-A.patch package/apache: fix build with per-package directory support 2020-02-18 23:16:15 +01:00
0004-server-log.c-ap_log_pid-Use-a-temporary-file-then-re.patch package/apache: atomic creation of pid file. 2020-04-13 11:06:09 +02:00
apache.hash package/apache: security bump to version 2.4.43 2020-04-04 17:26:49 +02:00
apache.mk package/apache: security bump to version 2.4.43 2020-04-04 17:26:49 +02:00
apache.service apache: add systemd init script 2018-06-23 09:51:59 +02:00
Config.in package/a*/Config.in: fix help text wrapping 2017-05-11 23:25:00 +02:00
S50apache apache: add reload target to sysv init script 2018-06-22 19:10:10 +02:00