**crypto_mod.c:343:12**
```
make[3]: 'libsrdb1.so.1.0' is up to date.
LD (gcc) [M db_sqlite.so] db_sqlite.so
CC (gcc) [M log_systemd.so] journal_send.o
CC (gcc) [M log_systemd.so] log_systemd_mod.o …
[View More]
LD (gcc) [M log_systemd.so] log_systemd.so
CC (gcc) [M systemdops.so] systemdops_mod.o
LD (gcc) [M systemdops.so] systemdops.so
CC (gcc) [M crypto.so] crypto_uuid.o
CC (gcc) [M crypto.so] crypto_aes.o
CC (gcc) [M crypto.so] crypto_evcb.o
CC (gcc) [M crypto.so] crypto_mod.o
crypto_mod.c:343:12: warning: 'ki_crypto_hmac_sha256' defined but not used [-Wunused-function]
static int ki_crypto_hmac_sha256(sip_msg_t* msg, str *ins, str *keys, str *dpv)
^~~~~~~~~~~~~~~~~~~~~
CC (gcc) [M crypto.so] api.o
LD (gcc) [M crypto.so] crypto.so
CC (gcc) [M tls.so] tls_util.o
CC (gcc) [M tls.so] tls_domain.o
CC (gcc) [M tls.so] tls_locking.o
```
Maybe not related to Kamailio sources
```
LD (gcc) [M usrloc.so] usrloc.so
CC (gcc) [M xhttp.so] xhttp_mod.o
CC (gcc) [M xhttp.so] xhttp_trans.o
In file included from ../../core/str.h:24,
from ../../core/pvar.h:30,
from xhttp_trans.c:21:
In function 'memset',
inlined from 'xhttp_tr_eval_xhttpurl' at xhttp_trans.c:69:5:
/usr/include/fortify/string.h:72:9: warning: '__builtin_memset' offset [9, 16] from the object at '_httpurl_str' is out of the bounds of referenced subobject 's' with type 'char *' at offset 0 [-Warray-bounds]
72 | return __builtin_memset(__d, __c, __n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LD (gcc) [M xhttp.so] xhttp.so
CC (gcc) [M xhttp_prom.so] prom.o
CC (gcc) [M xhttp_prom.so] prom_metric.o
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2619
[View Less]
Module: kamailio
Branch: master
Commit: 7ab2e85437482b4dba86937a29da025503450014
URL: https://github.com/kamailio/kamailio/commit/7ab2e85437482b4dba86937a29da025…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-02T21:37:32+01:00
core: take in consideration --no-atexit for daemonize()
---
Modified: src/core/daemonize.c
Modified: src/core/daemonize.h
---
Diff: https://github.com/kamailio/kamailio/…
[View More]commit/7ab2e85437482b4dba86937a29da025…
Patch: https://github.com/kamailio/kamailio/commit/7ab2e85437482b4dba86937a29da025…
---
diff --git a/src/core/daemonize.c b/src/core/daemonize.c
index d6692523c7..4eb7e1f25a 100644
--- a/src/core/daemonize.c
+++ b/src/core/daemonize.c
@@ -69,6 +69,8 @@
#define MAX_FD 32 /* maximum number of inherited open file descriptors,
(normally it shouldn't be bigger than 3) */
+extern int ksr_no_atexit;
+
/** temporary pipe FDs for sending exit status back to the ancestor process.
* This pipe is used to send the desired exit status to the initial process,
* that waits for it in the foreground. This way late errors preventing
@@ -297,9 +299,9 @@ int daemonize(char* name, int status_wait)
goto error;
}else if (pid!=0){
if (status_wait) {
- if (daemon_status_wait(&pipe_status) == 0)
+ if (daemon_status_wait(&pipe_status) == 0) {
exit((int)pipe_status);
- else{
+ } else {
LM_ERR("Main process exited before writing to pipe\n");
exit(-1);
}
diff --git a/src/core/daemonize.h b/src/core/daemonize.h
index a8ee113a77..481cf0cd83 100644
--- a/src/core/daemonize.h
+++ b/src/core/daemonize.h
@@ -41,6 +41,14 @@ int daemon_status_send(char status);
void daemon_status_no_wait(void);
void daemon_status_on_fork_cleanup(void);
+#define ksr_exit(exvar, excode) do { \
+ if(exvar==1) { \
+ _exit(excode); \
+ } else { \
+ exit(excode); \
+ } \
+ } while(0)
+
#endif /*_daemonize_h */
/* vi: set ts=4 sw=4 tw=79:ai:cindent: */
[View Less]