Skip to content

Commit 1851855

Browse files
committed
cdba-server: log message on CDBA exit
To identify closing of the session, log the message when CDBA quits. Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 96500b7 commit 1851855

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cdba-server.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ static void sigpipe_handler(int signo)
201201
watch_quit();
202202
}
203203

204+
static void atexit_handler(void)
205+
{
206+
syslog(LOG_INFO, "exiting");
207+
}
208+
204209
int main(int argc, char **argv)
205210
{
206211
int flags;
@@ -217,6 +222,7 @@ int main(int argc, char **argv)
217222
username = "nobody";
218223

219224
openlog("cdba-server", LOG_PID, LOG_DAEMON);
225+
atexit(atexit_handler);
220226

221227
ret = device_parser(".cdba");
222228
if (ret) {

0 commit comments

Comments
 (0)