autofs/SOURCES/autofs-5.1.8-rename-statemachine-to-signal_handler.patch
2023-09-27 12:42:21 +00:00

64 lines
1.7 KiB
Diff

autofs-5.1.8 - rename statemachine() to signal_handler()
From: Ian Kent <raven@themaw.net>
Rename function statemachine() to signal_handler() to align with what
the function actually does.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
daemon/automount.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -113,6 +113,7 @@
- fix deadlock in lookups.
- dont delay expire.
- make amd mapent search function name clear.
+- rename statemachine() to signal_handler().
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/daemon/automount.c
+++ autofs-5.1.4/daemon/automount.c
@@ -74,7 +74,7 @@ int do_force_unlink = 0; /* Forceably u
static int start_pipefd[2] = {-1, -1};
static int st_stat = 1;
static int *pst_stat = &st_stat;
-static pthread_t state_mach_thid;
+static pthread_t signal_handler_thid;
static sigset_t block_sigs;
@@ -1576,7 +1576,7 @@ static int do_hup_signal(struct master *
}
/* Deal with all the signal-driven events in the state machine */
-static void *statemachine(void *arg)
+static void *signal_handler(void *arg)
{
sigset_t signalset;
int sig;
@@ -1764,7 +1764,7 @@ static void handle_mounts_cleanup(void *
* perform final cleanup.
*/
if (!submount && !pending)
- pthread_kill(state_mach_thid, SIGTERM);
+ pthread_kill(signal_handler_thid, SIGTERM);
master_mutex_unlock();
@@ -2763,8 +2763,8 @@ int main(int argc, char *argv[])
sd_notify(1, "READY=1");
#endif
- state_mach_thid = pthread_self();
- statemachine(NULL);
+ signal_handler_thid = pthread_self();
+ signal_handler(NULL);
}
master_kill(master_list);