This is an archive of the discontinued LLVM Phabricator instance.

check for interrupt from fgets on Windows
ClosedPublic

Authored by lanza on Jul 11 2019, 11:26 PM.

Details

Summary

Windows does not have the error EINTR when a blocking syscall is
interrupted by a signal. The ReadFile API that fgets is implemented
with instead use ERROR_OPERATION_ABORTED. Check for that after fgets.

Event Timeline

lanza created this revision.Jul 11 2019, 11:26 PM
This revision is now accepted and ready to land.Jul 11 2019, 11:41 PM

This actually doesn't seem to be working due to a bug in Windows' ReadFile. https://github.com/microsoft/terminal/issues/334 @stella.stamenova any idea about this?

lanza closed this revision.Jul 18 2019, 5:40 PM