Page MenuHomeFreeBSD

cal: don't print terminal control characters unless stdout is a TTY
ClosedPublic

Authored by asomers on Jan 13 2023, 8:22 PM.
Tags
None
Referenced Files
F175005227: D38045.id115105.diff
Wed, Oct 7, 2:05 PM
Unknown Object (File)
Fri, Sep 11, 5:20 PM
Unknown Object (File)
Thu, Sep 10, 9:00 PM
Unknown Object (File)
Wed, Sep 9, 1:53 AM
Unknown Object (File)
Sep 6 2026, 4:25 AM
Unknown Object (File)
Sep 5 2026, 7:16 AM
Unknown Object (File)
Sep 4 2026, 8:51 AM
Unknown Object (File)
Sep 4 2026, 6:13 AM
Subscribers
None

Details

Summary

A similar change was made in svn r223931, but it was incomplete, working
only when the utility was invoked as "ncal". Fix the same issue when
invoking as "cal".

PR: 268936
Reported by: Ray Bellis <ray@bellis.me.uk>
MFC after: 2 weeks
Sponsored by: Axcient

Test Plan

manually tested with "cal | xxd"

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49098
Build 45987: arc lint + arc unit