summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-08-22 16:28:39 +0200
committerSander Vrijders <[email protected]>2016-08-22 16:28:39 +0200
commitac01105baf8ceb2c8c8a3711531840498c8a6fa9 (patch)
tree58e010a2cd69cf12d90748b7d9454c1ca6bf1c60 /src/ipcpd/ipcp.c
parentf99731a667b2ba5aa8ac7f1b331e03e7ad62e7c7 (diff)
parent82c6b3ed73b01321141488c634c9c1c4d515b04b (diff)
downloadouroboros-ac01105baf8ceb2c8c8a3711531840498c8a6fa9.tar.gz
ouroboros-ac01105baf8ceb2c8c8a3711531840498c8a6fa9.zip
Merged in dstaesse/ouroboros/be-unlink (pull request #216)
irmd, ipcp: Unlink file for UNIX sockets
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 4f3e6799..1c4fab94 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -103,7 +103,13 @@ int ipcp_parse_arg(int argc, char * argv[])
static void close_ptr(void * o)
{
+ char * name = ipcp_sock_path(getpid());
close(*((int *) o));
+
+ if (unlink(name))
+ LOG_DBG("Could not unlink %s.", name);
+
+ free(name);
}
static void clean_msg(void * msg)