Proposal for src/redis.c: #463

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

rebx commented Apr 17, 2012

If the config file has either specified "daemonize yes" or "pidfile [/path/to/redis.pid]" then it should create pidfile.

Some background for this is: I usually run redis via daemontools. That entails running redis-server on the foreground. Given that, I'd also want redis-server to create a pidfile so other processes (e.g. nagios) can run checks for that.

Proposal for src/redis.c:
If the config file has either specified "daemonize yes" or "pidfile [/path/to/redis.pid]" then it should create  pidfile.

Some background for this is: I usually run redis via daemontools. That entails running redis-server on the foreground. Given that, I'd also want redis-server to create a pidfile so other processes (e.g. nagios) can run checks for that.
Owner

rebx commented on 702e9cf Apr 17, 2012

I have this habit of editing code on github, so this change will require some testing

Owner

antirez commented Apr 21, 2012

why don't you simply specify a pidfile in the configuration so that it will create it?

Contributor

rebx commented Apr 21, 2012

it won'd make it if daemonize is set to no, right?

On Sat, Apr 21, 2012 at 10:22 PM, Salvatore Sanfilippo <
reply@reply.github.com

wrote:

why don't you simply specify a pidfile in the configuration so that it
will create it?


Reply to this email directly or view it on GitHub:
#463 (comment)

mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

mattsta added a commit to mattsta/redis that referenced this pull request Aug 2, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

@mattsta mattsta referenced this pull request Aug 2, 2014

Closed

ALL simple issue fixes #1906

mattsta added a commit to mattsta/redis that referenced this pull request Aug 6, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463
Contributor

mattsta commented Aug 25, 2014

Denied because "server.pidfile is always true. There is currently no way to set the pid to a value that will disable it, and this may not even be desirable. An alternative is to add an option to write the pid file even if the server is not daemonized."

mattsta added a commit to mattsta/redis that referenced this pull request Aug 25, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

@mattsta mattsta referenced this pull request Aug 25, 2014

Closed

Always pidfile if defined #1967

mattsta added a commit to mattsta/redis that referenced this pull request Oct 9, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

mattsta added a commit to mattsta/redis that referenced this pull request Dec 11, 2014

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

mattsta added a commit to mattsta/redis that referenced this pull request Jan 8, 2015

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

mattsta added a commit to mattsta/redis that referenced this pull request Jan 9, 2015

Create PID file even if in foreground
Previously, Redis only wrote the pid file if
it was daemonizing, but many times it's useful to have
the pid written out even if you're in the foreground.

Some background for this is:
I usually run redis via daemontools. That entails running
redis-server on the foreground. Given that, I'd also want
redis-server to create a pidfile so other processes (e.g. nagios)
can run checks for that.

Closes #463

@antirez antirez closed this in #2266 Jan 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment