projects
/
onak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3867328
)
Send close command when cleaning up keyd backend
author
Jonathan McDowell
<noodles@earth.li>
Tue, 15 Mar 2011 04:29:50 +0000
(21:29 -0700)
committer
Jonathan McDowell
<noodles@earth.li>
Tue, 15 Mar 2011 04:29:50 +0000
(21:29 -0700)
Previously we just shutdown the socket; we should really tell keyd
we're disappearing as well.
keydb_keyd.c
patch
|
blob
|
history
diff --git
a/keydb_keyd.c
b/keydb_keyd.c
index 3f199bd8c09d319c66344a8f842fdb1fa39a0971..dcdcb85f3669eeb6919a92de3dedefd7cec5a3cd 100644
(file)
--- a/
keydb_keyd.c
+++ b/
keydb_keyd.c
@@
-103,6
+103,15
@@
static void keyd_initdb(bool readonly)
*/
static void keyd_cleanupdb(void)
{
+ int cmd = KEYD_CMD_CLOSE;
+
+ if (write(keyd_fd, &cmd, sizeof(cmd)) != sizeof(cmd)) {
+ logthing(LOGTHING_CRITICAL,
+ "Couldn't send close cmd: %s (%d)",
+ strerror(errno),
+ errno);
+ }
+
if (shutdown(keyd_fd, SHUT_RDWR) < 0) {
logthing(LOGTHING_NOTICE, "Error shutting down socket: %d",
errno);