kumquat-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
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
Config.in
S50apache