From: Bert Hubert Date: Thu, 7 Mar 2013 11:05:56 +0000 (+0000) Subject: actually clean up unix domain sockets too after use X-Git-Tag: rec-3.5-rc3~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9dd76b0f618dd77907eedf2e0e71787d5af8564;p=pdns 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 --- diff --git a/modules/pipebackend/coprocess.cc b/modules/pipebackend/coprocess.cc index 1b85a286b..8f9f454f6 100644 --- a/modules/pipebackend/coprocess.cc +++ b/modules/pipebackend/coprocess.cc @@ -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); diff --git a/modules/pipebackend/coprocess.hh b/modules/pipebackend/coprocess.hh index a405afc26..188ced1d7 100644 --- a/modules/pipebackend/coprocess.hh +++ b/modules/pipebackend/coprocess.hh @@ -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;