[PATCH v2 1/2] main: Add support for $NOTIFY_SOCKET