There is another possibility: there are two kinds of threads in Python: non-daemon and daemon. The former is as you describe: it will prevent the program from exiting when a termination signal is received. However, the latter will not: the thread dies when the program dies.
WeeWX generally uses daemon threads. However, it's possible some extension or driver is creating non-daemon threads, thus blocking termination until the thread dies. -tk On Wed, Jul 8, 2020 at 4:37 AM mwall <[email protected]> wrote: > when you do '/etc/init.d/weewx stop' or 'systemctl stop weewx', does weewx > eventually stop? > > when you do either of these commands, this sends a SIGTERM to weewx, which > tells the main thread to stop. however, weewx will not actually stop until > all of its threads have completed. so if you have a report that takes a > long time to run then weewx may not shut down until well after you send the > SIGTERM. > > this is often noticeable on rpi with a weewx configuration that has many > compute-intensive reports > > if you have an extension with misbehaving threads or forked processes, > then you might also end up with zombie threads/processes that prevent weewx > from shutting down properly. > > m > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/5942bce7-b168-433e-ae2e-71fe10f78f31o%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/5942bce7-b168-433e-ae2e-71fe10f78f31o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEDJ3CQo1bGqhFQ%3DzZC%2BcSH5kKt5dM8d5O%2B5f0RZBFFVkQ%40mail.gmail.com.
