summaryrefslogtreecommitdiffstats
path: root/udscs.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-11-01 12:25:16 +0100
committerHans de Goede <hdegoede@redhat.com>2010-11-01 12:25:16 +0100
commitba324d0f1fdee3e5f24618b4d590011007d417a2 (patch)
treea46124f41138a22710a3a2a352f30c8fb0082f36 /udscs.c
parentf05f0a5602cb386b905d3ffcddcb12bdf9a823e4 (diff)
downloadvd_agent-ba324d0f1fdee3e5f24618b4d590011007d417a2.tar.gz
vd_agent-ba324d0f1fdee3e5f24618b4d590011007d417a2.tar.xz
vd_agent-ba324d0f1fdee3e5f24618b4d590011007d417a2.zip
vdagentd: unlink socket on exit rather then startup
This makes sure that the daemon cannot be started twice.
Diffstat (limited to 'udscs.c')
-rw-r--r--udscs.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/udscs.c b/udscs.c
index 6f93648..b6caa4c 100644
--- a/udscs.c
+++ b/udscs.c
@@ -108,14 +108,6 @@ struct udscs_server *udscs_create_server(const char *socketname,
return NULL;
}
- c = unlink(socketname);
- if (c != 0 && errno != ENOENT) {
- fprintf(server->errfile, "unlink %s: %s\n", socketname,
- strerror(errno));
- free(server);
- return NULL;
- }
-
address.sun_family = AF_UNIX;
snprintf(address.sun_path, sizeof(address.sun_path), "%s", socketname);
c = bind(server->fd, (struct sockaddr *)&address, sizeof(address));