diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-11-01 12:25:16 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-11-01 12:25:16 +0100 |
commit | ba324d0f1fdee3e5f24618b4d590011007d417a2 (patch) | |
tree | a46124f41138a22710a3a2a352f30c8fb0082f36 /udscs.c | |
parent | f05f0a5602cb386b905d3ffcddcb12bdf9a823e4 (diff) | |
download | vd_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.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -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)); |