Hacker News new | ask | show | jobs
by bwhmather 4398 days ago
Option 1 is already provided. The sd_notify function is simply a convenience wrapper for sending messages on a socket specified by the NOTIFY_SOCKET environment variable.

See the notes in sd_notify(3) or https://lists.debian.org/debian-ctte/2013/12/msg00230.html for a simple alternative implementation. Admittedly could be better documented.

edit: point to notes section

1 comments

MSG_NOSIGNAL is a portability PITA.