]> granicus.if.org Git - pdns/commitdiff
actually clean up unix domain sockets too after use
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 7 Mar 2013 11:05:56 +0000 (11:05 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 7 Mar 2013 11:05:56 +0000 (11:05 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3114 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/pipebackend/coprocess.cc
modules/pipebackend/coprocess.hh

index 1b85a286b0d8eb4d2e562640be48aded9bb2677e..8f9f454f620e877990607fc61509a7fa21ce8b91 100644 (file)
@@ -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);
index a405afc26535008584f76aab82b298e0c576dbf5..188ced1d7444fc16c6502abd09ae34cbd8489b57 100644 (file)
@@ -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;