This is an archive of the discontinued LLVM Phabricator instance.

[libc] add isatty
ClosedPublic

Authored by michaelrj on Oct 10 2022, 2:45 PM.

Details

Summary

The isatty function uses the side effects of an ioctl call to determine
if a specific file descriptor is a terminal. I chose TIOCGETD (get line
discipline of terminal) because it didn't require any new structs.

Diff Detail

Event Timeline

michaelrj created this revision.Oct 10 2022, 2:45 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 10 2022, 2:45 PM
michaelrj requested review of this revision.Oct 10 2022, 2:45 PM
sivachandra accepted this revision.Oct 10 2022, 3:09 PM
This revision is now accepted and ready to land.Oct 10 2022, 3:09 PM
lntue accepted this revision.Oct 10 2022, 3:11 PM
This revision was automatically updated to reflect the committed changes.