Skip to content

systemd kills dma after forking to background and unit terminates #128

Description

@corecode

I am using systemd timers to schedule backup runs. Mails sent after backup never arrive, presumably because:

  1. backup software invokes mail
  2. mail invokes dma (as sendmail)
  3. dma daemon()izes after writing the queue file, effectively exiting dma from the view of mail
  4. mail and subsequently backup software exit
  5. systemd sees the backup process exit and then kills the cgroup
  6. dma is killed, the queue file stays in place and never gets delivered

I am not sure how to generically fix this. One option would be to have a systemd unit that gets triggered on a socket, running a dma -q. If this socket is active, then dma would terminate instead of trying to deliver itself. Of course this requires installing and activating a systemd unit, but I don't see how we could do it without.

Seeking comments.

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