From d96d583328f614c658d42f5bb0d2a0f81621327e Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 24 Apr 2024 23:31:54 +0200 Subject: Use octal instead of mode macros They are more readable. And we had a mix of both styles; there wasn't really a consistent style. Tested-by: Andrew Clayton Reviewed-by: Andrew Clayton Signed-off-by: Alejandro Colomar --- src/nxt_main_process.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nxt_main_process.c') diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index 060ead41..c302cb02 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -1275,13 +1275,11 @@ nxt_main_listening_socket(nxt_sockaddr_t *sa, nxt_listening_socket_t *ls) && sa->u.sockaddr_un.sun_path[0] != '\0') { char *filename; - mode_t access; nxt_thread_t *thr; filename = sa->u.sockaddr_un.sun_path; - access = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); - if (chmod(filename, access) != 0) { + if (chmod(filename, 0666) != 0) { ls->end = nxt_sprintf(ls->start, ls->end, "chmod(\\\"%s\\\") failed %E", filename, nxt_errno); -- cgit From 55041ef9607c073bc5e1b431ec271e9c23200cb1 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 4 Jul 2024 15:52:56 +0100 Subject: Flow the language module name into nxt_app_lang_module_t The nxt_app_lang_module_t structure contains various bits of information as obtained from the nxt_app_module_t structure that language modules define. One bit of information that is in the nxt_app_module_t but not in the nxt_app_lang_module_t is the language module name. Having this name flowed through will be useful for displaying the loaded language modules in the /status endpoint. Signed-off-by: Andrew Clayton --- src/nxt_main_process.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nxt_main_process.c') diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index c302cb02..00318226 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -1354,6 +1354,12 @@ static nxt_conf_map_t nxt_app_lang_module_map[] = { offsetof(nxt_app_lang_module_t, type), }, + { + nxt_string("name"), + NXT_CONF_MAP_CSTRZ, + offsetof(nxt_app_lang_module_t, name), + }, + { nxt_string("version"), NXT_CONF_MAP_CSTRZ, -- cgit