about summary refs log tree commit diff
path: root/src/libnix/exec.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-22T10·48+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-22T10·48+0000
commit4a8948b7a60e751dd809f279f1baa434ea09a4d3 (patch)
tree3c8475fe2280f2e48654f287c46edc580bf4382c /src/libnix/exec.cc
parentc62433751d5fce8c25a802989c50fee993f39c2d (diff)
* Some wrapper classes to ensure that file descriptors / directory
  handles are closed when they go out of scope.

Diffstat (limited to 'src/libnix/exec.cc')
-rw-r--r--src/libnix/exec.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libnix/exec.cc b/src/libnix/exec.cc
index 2e092b2e0dd6..a51b605d8100 100644
--- a/src/libnix/exec.cc
+++ b/src/libnix/exec.cc
@@ -11,29 +11,6 @@
 #include "globals.hh"
 
 
-class AutoDelete
-{
-    string path;
-    bool del;
-public:
-
-    AutoDelete(const string & p) : path(p) 
-    {
-        del = true;
-    }
-
-    ~AutoDelete()
-    {
-        if (del) deletePath(path);
-    }
-
-    void cancel()
-    {
-        del = false;
-    }
-};
-
-
 static string pathNullDevice = "/dev/null";
 
 
@@ -140,5 +117,3 @@ void runProgram(const string & program,
         throw Error("unable to build package");
     }
 }
-
-