alexander-akhmetov/python-telegram

Incompatible with Windows

NotoriousPyro opened this issue · 2 comments

Removing SIGQUIT and replacing with SIGTERM fixes the issue and works on both Linux and Windows:
From:

    def idle(
        self,
        stop_signals: Tuple = (
            signal.SIGINT,
            signal.SIGTERM,
            signal.SIGABRT,
            signal.SIGQUIT,
        ),

To:

    def idle(
        self,
        stop_signals: Tuple = (
            signal.SIGINT,
            signal.SIGTERM,
            signal.SIGABRT,
            signal.SIGTERM,
        ),

SIGQUIT is Linux specific and should only occur if requesting a core dump, e.g. when pressing CTRL + \ https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html#index-SIGQUIT

Hi. Thanks, makes sense I'll take a look! There are a couple of other places where the library is unix-specific, but it shouldn't be difficult to change.

Fixed the signals: #408