From 57d8aa8ffefcc226c5c3179e4a8d346cbe61e865 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 22 May 2024 19:52:54 +0200 Subject: util: Rename write_pidfile() to pidfile_write() As I'm adding pidfile_open() in the next patch. The function comment didn't match, by the way. Signed-off-by: Stefano Brivio Reviewed-by: Richard W.M. Jones --- util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 975664a..8a2ffaf 100644 --- a/util.c +++ b/util.c @@ -380,11 +380,11 @@ int open_in_ns(const struct ctx *c, const char *path, int flags) } /** - * pid_file() - Write PID to file, if requested to do so, and close it + * pidfile_write() - Write PID to file, if requested to do so, and close it * @fd: Open PID file descriptor, closed on exit, -1 to skip writing it * @pid: PID value to write */ -void write_pidfile(int fd, pid_t pid) +void pidfile_write(int fd, pid_t pid) { char pid_buf[12]; int n; @@ -419,7 +419,7 @@ int __daemon(int pidfile_fd, int devnull_fd) } if (pid) { - write_pidfile(pidfile_fd, pid); + pidfile_write(pidfile_fd, pid); exit(EXIT_SUCCESS); } -- cgit v1.2.3