dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.8k stars 948 forks source link

--pidfile parameter for the dragonflydb binary #209

Closed anosulchik closed 2 years ago

anosulchik commented 2 years ago

--pidfile=</path/to/dragonflybd.pid> would make it easier to integrate it with monit. When this param is specified, dragonflydb would write its pid into specified file or fail if it's possible e.g. due to permission.

iko1 commented 2 years ago

@romange, I'd like to implement a function that creates pidfilefile, where is the suitable place to place that function? I think the file proc_util.c within helio can be an option. The function will be called from server bootstrap in dfly_main.cc

romange commented 2 years ago

Thanks @iko1 . Let's just implement everything inside dfly_main.cc.