Skip to content

SIGTERM is ignored while a container event blocks #560

Closed

Description

@achton

listen() reads SIGTERM in the same select loop that calls handleContainer(). If a Docker or D-Bus call in handleContainer() blocks, ldddns ignores SIGTERM until systemd kills it after 30 seconds. #558 fixes the known cause, but any other blocking call has the same effect.

Handle the signal in its own goroutine, for example with signal.NotifyContext(), and pass the context to the Docker calls. The go-avahi calls take no context, so also exit after a timeout if the loop does not return.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions