diff options
author | François Andriot <francois.andriot@free.fr> | 2014-10-11 17:45:18 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2014-10-11 17:45:18 +0200 |
commit | c8b810f149c2ed1815ae59b5275d435152ab52ad (patch) | |
tree | c9687075aeab9d6e80465114ec2231729c1ae64c /tdesu/process.cpp | |
parent | 8f117582531853100b5e0e5ce6a654398270c6c4 (diff) | |
download | tdelibs-c8b810f149c2ed1815ae59b5275d435152ab52ad.tar.gz tdelibs-c8b810f149c2ed1815ae59b5275d435152ab52ad.zip |
Fix tdesu process handling
Diffstat (limited to 'tdesu/process.cpp')
-rw-r--r-- | tdesu/process.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tdesu/process.cpp b/tdesu/process.cpp index 28e3bb110..0fded3184 100644 --- a/tdesu/process.cpp +++ b/tdesu/process.cpp @@ -492,8 +492,13 @@ int PtyProcess::waitForChild() 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) |