[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH]close file descriptor



Hi,

in cryptodev.py after open file descriptors using os.pipe,
write pipe is closed but read pipe is not closed.
Is it not needed ?

thank you in advance.
diff --git a/cryptodev.py b/cryptodev.py
index 0b6967b..704df07 100644
--- a/cryptodev.py
+++ b/cryptodev.py
@@ -121,6 +121,7 @@ class LUKSDevice:
                                     stderr = "/dev/tty5",
                                     searchPath = 1)
         self.format = 0
+        os.close(p[0])
         return rc
 
     def openDevice(self):
@@ -151,6 +152,7 @@ class LUKSDevice:
                                     stdout = "/dev/null",
                                     stderr = "/dev/tty5",
                                     searchPath = 1)
+        os.close(p[0])
         return rc
 
     def closeDevice(self):

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]