Branch: master

c8b810f1 2014-10-11 10:45:18 François Andriot
Fix tdesu process handling
M tdesu/process.cpp
diff --git a/tdesu/process.cpp b/tdesu/process.cpp
index 28e3bb1..0fded31 100644
--- a/tdesu/process.cpp
+++ b/tdesu/process.cpp
@@ -492,8 +492,13 @@
 
     while (1) 
     {
-        FD_SET(m_Fd, &fds);
-        int ret = select(m_Fd+1, &fds, 0L, 0L, 0L);
+        int ret = 0;
+
+        if (m_Fd != -1)
+        {
+            FD_SET(m_Fd, &fds);
+            ret = select(m_Fd+1, &fds, 0L, 0L, 0L);
+        }
         if (ret == -1) 
         {
             if (errno != EINTR)