Skip to content

Commit

Permalink
cdba-server: log message on CDBA exit
Browse files Browse the repository at this point in the history
To identify closing of the session, log the message when CDBA quits.

Signed-off-by: Dmitry Baryshkov <[email protected]>
  • Loading branch information
lumag committed May 31, 2024
1 parent 95ff304 commit cbad92a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdba-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ static void sigpipe_handler(int signo)
watch_quit();
}

static void atexit_handler(void)
{
syslog(LOG_INFO, "exiting");
}

int main(int argc, char **argv)
{
int flags;
Expand All @@ -217,6 +222,7 @@ int main(int argc, char **argv)
username = "nobody";

openlog("cdba-server", LOG_PID, LOG_DAEMON);
atexit(atexit_handler);

ret = device_parser(".cdba");
if (ret) {
Expand Down

0 comments on commit cbad92a

Please sign in to comment.