The goal is to never implicitly ignore errors that the function can
return, particularly the failure on pidfile locking due to the file
being hold by another instance. This problem happened recently in
crimson-osd.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
// Write a pidfile with the current pid, using the configuration in the
// provided conf structure.
-int pidfile_write(std::string_view pid_file);
+[[nodiscard]] int pidfile_write(std::string_view pid_file);
// Remove the pid file that was previously written by pidfile_write.
// This is safe to call in a signal handler context.