Skip to content

Commit

Permalink
core: monitor: do not leak stderr file descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
xqms committed Dec 16, 2020
1 parent ab77bbe commit 020cc56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rosmon_core/src/monitor/node_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ void NodeMonitor::communicateStderr()
handleByte('\n');

m_fdWatcher->removeFD(m_stderrFD);
close(m_stderrFD);
m_stderrFD = -1;
return; // handled in communicate()
}

Expand Down

0 comments on commit 020cc56

Please sign in to comment.