Skip to content

gmoccapy: does not exit on SIGTERM (swallows it as KeyboardInterrupt) #4069

@grandixximo

Description

@grandixximo

gmoccapy does not exit on SIGTERM; the test harness in #4054 has to escalate to SIGKILL (WARN: linuxcnc did not exit on SIGTERM, escalating to KILL).

Verified (uspace RIP, strace + direct-signal isolation):

  • gmoccapy receives SIGTERM (no SIGINT is sent). /proc SigCgt = 0x100004000 (SIGTERM caught, SIGINT not).
  • PyGObject's wakeup-fd bridge (gi/_ossighelper.py signal_notify) surfaces the SIGTERM into Python as a KeyboardInterrupt.
  • gmoccapy's top-level error handler catches and swallows it, logs Found an error ... KeyboardInterrupt (the misleading traceback, frame varies e.g. hal_bar.py:232), and keeps running.
  • Net: SIGTERM is swallowed, so gmoccapy never exits and must be KILLed.

This is also the source of the KeyboardInterrupt traceback reported in #4054. gmoccapy should handle SIGTERM and shut down cleanly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions