Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#198 closed enhancement (wontfix)

when daemon=off do not create pid file

Reported by: Cristian Rodriguez Owned by: somebody
Priority: minor Milestone: 1.3.5
Component: nginx-core Version: 1.3.x
Keywords: Cc:
uname -a: linux
nginx -V: 1.3.4

Description

Hi:

When nginx is configured to avoid daemonizing, it should not create a PID file, or at least allow the pid setting to be set to off.

Modern init systems do their own process id tracking without the need of this legacy in-file mechanism.

Change History (2)

comment:1 by Maxim Dounin, 8 years ago

Resolution: wontfix
Status: newclosed

A pid file is required at least for "nginx -s" handling, which is the only way to control nginx under win32 and usable way to control nginx under unix. It is also usable for things like configuration reloading via HUP signal and log rotation via USR1 signal, as ways to track process id with various init systems might be different, while "kill -USR1 cat /path/to/nginx.pid" is well known and universal.

That is, pid file is still required in some cases and at least usable in most cases. I don't see real reasons work on this, hence closing this as 'wontfix'.

(Note well: running nginx without demonizing isn't really recommended, mainly due to the fact that this will prevent binary upgrade procedure from working. The "daemon off" mode is mainly intended for development.)

in reply to:  1 comment:2 by Cristian Rodriguez, 8 years ago

Replying to Maxim Dounin:

A pid file is required at least for "nginx -s" handling, which is the only way to control nginx under win32 and usable way to control nginx under unix. It is also usable for things like configuration reloading via HUP signal and log rotation via USR1 signal, as ways to track process id with various init systems might be different, while "kill -USR1 cat /path/to/nginx.pid" is well known and universal.

We are talking here in the context of linux distributions, on package upgrade signal HUP will be sent to the process.

That is, pid file is still required in some cases and at least usable in most cases. I don't see real reasons work on this, hence closing this as 'wontfix'.

(Note well: running nginx without demonizing isn't really recommended, mainly due to the fact that this will prevent binary upgrade procedure from working.

Binary upgrade is not going to work in this context anyway, the PID file is not used at all by systemd (default on Fedora, OpenSUSE, Arch, mandriva...) when the recommended non-daemonizing startup is used.

Note: See TracTickets for help on using tickets.