Permalink
Browse files

actually clean up unix domain sockets too after use

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3114 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information...
1 parent d71c777 commit d9dd76b0f618dd77907eedf2e0e71787d5af8564 @ahupowerdns ahupowerdns committed Mar 7, 2013
Showing with 6 additions and 0 deletions.
  1. +5 −0 modules/pipebackend/coprocess.cc
  2. +1 −0 modules/pipebackend/coprocess.hh
@@ -184,6 +184,11 @@ UnixRemote::UnixRemote(const string& path, int timeout)
d_fp = fdopen(d_fd, "r");
}
+UnixRemote::~UnixRemote()
+{
+ fclose(d_fp);
+}
+
void UnixRemote::send(const string& line)
{
string nline(line);
@@ -10,6 +10,7 @@
class CoRemote
{
public:
+ virtual ~CoRemote();
virtual void sendReceive(const string &send, string &receive) = 0;
virtual void receive(string &rcv) = 0;
virtual void send(const string &send) = 0;

0 comments on commit d9dd76b

Please sign in to comment.