This is an archive of the discontinued LLVM Phabricator instance.

Broadcase no more input event on EOF in Communication.cpp
AbandonedPublic

Authored by tberghammer on Apr 17 2015, 2:44 AM.

Details

Reviewers
labath
Summary

Broadcast no more input event on EOF in Communication.cpp

This fixes a dead lock in SynchronizeWithReadThread when the file
descriptor is already at EOF and it is always available for read.

Diff Detail

Event Timeline

tberghammer retitled this revision from to Broadcase no more input event on EOF in Communication.cpp.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added a reviewer: labath.
tberghammer added a subscriber: Unknown Object (MLST).
labath requested changes to this revision.Apr 17 2015, 3:51 AM
labath edited edge metadata.

The underlying problem here is that if CloseOnEOF is false, and the other end is closed, the read thread will sit in a busy loop continuously trying to read something (and failing). The right solution is to avoid the busy loop altogether.

This revision now requires changes to proceed.Apr 17 2015, 3:51 AM
tberghammer abandoned this revision.Apr 17 2015, 6:22 AM

Suggested fix uploaded as D9077