From c199c5cf6e39d6e21b92bddba7beeebcc3afca79 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 30 Aug 2023 13:17:07 +0200 Subject: misc: add cloexec_fds_from() helper function Move logic to set file descriptors to a cloexec_fds_from() function in misc.c so it can be shared by both supervisor-daemon and start-stop-daemon, and hide the details behind. --- src/shared/misc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/shared/misc.h') diff --git a/src/shared/misc.h b/src/shared/misc.h index f4ab25ad..b158a786 100644 --- a/src/shared/misc.h +++ b/src/shared/misc.h @@ -73,4 +73,6 @@ void from_time_t(char *time_string, time_t tv); time_t to_time_t(char *timestring); pid_t get_pid(const char *applet, const char *pidfile); +void cloexec_fds_from(int); + #endif -- cgit v1.2.3