mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: mworker: allow pidfile in mworker + foreground
This patch allows the use of the pidfile in master-worker mode without using the background option.
This commit is contained in:
parent
cc113822a7
commit
8029300df6
@ -2499,7 +2499,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* open log & pid files before the chroot */
|
/* open log & pid files before the chroot */
|
||||||
if (global.mode & MODE_DAEMON && global.pidfile != NULL) {
|
if ((global.mode & MODE_DAEMON || global.mode & MODE_MWORKER) && global.pidfile != NULL) {
|
||||||
unlink(global.pidfile);
|
unlink(global.pidfile);
|
||||||
pidfd = open(global.pidfile, O_CREAT | O_WRONLY | O_TRUNC, 0644);
|
pidfd = open(global.pidfile, O_CREAT | O_WRONLY | O_TRUNC, 0644);
|
||||||
if (pidfd < 0) {
|
if (pidfd < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user