Один и тот же процесс, вызываемый с флагом --daemonize не выходит по SIGTERM/SIGINT. Запустив его без этого флага, и собственно, без вызова daemon() всё нормально.
Из-за чего так может быть?
0x00007f57b6f28d61 in __futex_abstimed_wait_common64 (private=128, cancel=true, abstime=0x0, op=265, expected=5119, futex_word=0x7f57b6d1d990) at ./nptl/futex-internal.c:57
warning: 57 ./nptl/futex-internal.c: No such file or directory
(gdb) bt
#0 0x00007f57b6f28d61 in __futex_abstimed_wait_common64 (private=128, cancel=true, abstime=0x0, op=265, expected=5119, futex_word=0x7f57b6d1d990) at ./nptl/futex-internal.c:57
#1 __futex_abstimed_wait_common (cancel=true, private=128, abstime=0x0, clockid=0, expected=5119, futex_word=0x7f57b6d1d990) at ./nptl/futex-internal.c:87
#2 __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f57b6d1d990, expected=5119, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=128)
at ./nptl/futex-internal.c:139
#3 0x00007f57b6f2e793 in __pthread_clockjoin_ex (threadid=140014706087616, thread_return=0x0, clockid=0, abstime=0x0, block=<optimized out>) at ./nptl/pthread_join_common.c:102
#4 0x00007f57b71b9c2b in std::thread::join() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007f57b7aec504 in std::_Sp_counted_ptr_inplace<nt::mempool_t::pool_impl::memblock_allocation_thread, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
from /opt/nt/lib/libnt.so.1
#6 0x000055aa054abc7e in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use (this=0x55aa05aca9b0) at /usr/include/c++/13/bits/shared_ptr_base.h:175
#7 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release_last_use_cold (this=0x55aa05aca9b0) at /usr/include/c++/13/bits/shared_ptr_base.h:199
#8 0x00007f57b7aea804 in nt::mempool_t::~mempool_t() () from /opt/nt/lib/libnt.so.1
#9 0x000055aa054aaecd in ntproto::stream_storage::~stream_storage (this=0x55aa05ac4cb0, __in_chrg=<optimized out>) at /opt/nt/include/ntproto/ntproto_stream_storage.h:145
#10 std::default_delete<ntproto::stream_storage>::operator() (__ptr=0x55aa05ac4cb0, this=<optimized out>) at /usr/include/c++/13/bits/unique_ptr.h:99
#11 std::unique_ptr<ntproto::stream_storage, std::default_delete<ntproto::stream_storage> >::~unique_ptr (this=0x7ffcb0d09670, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/unique_ptr.h:404
#12 ntproto::stream::~stream (this=0x7ffcb0d09650, __in_chrg=<optimized out>) at /opt/nt/include/ntproto/ntproto_stream.h:35
#13 ntdataflows_stream::~ntdataflows_stream (this=0x7ffcb0d09650, __in_chrg=<optimized out>) at /home/g10/projects/components/nt-dataflows/.build/ntdataflows_stream.h:26
#14 ntdataflows_service::~ntdataflows_service (this=0x7ffcb0d09640, __in_chrg=<optimized out>) at /home/g10/projects/components/nt-dataflows/src/service/ntdataflows_service.cc:565
#15 0x000055aa0549248a in main (argc=<optimized out>, argv=0x7ffcb0d098d8) at /home/g10/projects/components/nt-dataflows/src/service/ntdataflows_service.cc:985



