Page MenuHomeFreeBSD

periodic: replace "tty" with "test -t 0"
ClosedPublic

Authored by asomers on Aug 18 2019, 5:24 PM.
Tags
None
Referenced Files
F81950266: D21318.diff
Tue, Apr 23, 3:57 PM
Unknown Object (File)
Mar 12 2024, 9:15 AM
Unknown Object (File)
Mar 12 2024, 9:11 AM
Unknown Object (File)
Mar 12 2024, 9:11 AM
Unknown Object (File)
Mar 12 2024, 9:11 AM
Unknown Object (File)
Mar 12 2024, 9:11 AM
Unknown Object (File)
Mar 8 2024, 5:27 AM
Unknown Object (File)
Jan 4 2024, 1:22 PM
Subscribers
None

Details

Summary

periodic: replace "tty" with "test -t 0"

Apparently using tty for this purpose has been deprecated since 4.4 Lite.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25949
Build 24508: arc lint + arc unit

Event Timeline

cy requested changes to this revision.Aug 18 2019, 6:41 PM
cy added inline comments.
usr.sbin/periodic/periodic.sh
87

can this be if [ -t 0] ?

test fork()s and exec()s a new process whereas [ performs the test within the shell, saving a fork() & exec().

This revision now requires changes to proceed.Aug 18 2019, 6:41 PM

Thanks. LGTM.

usr.sbin/periodic/periodic.sh
89

Sorry for missing this before but there is nothing between this else end endif. Did you mean

export PERIODIC_IS_INTERACTIVE=0

or unset PERIODIC_IS_INTERACTIVE

usr.sbin/periodic/periodic.sh
89

Oh, crap, I meant to delete that. It was only there for debugging purposes.

This revision is now accepted and ready to land.Aug 19 2019, 1:09 AM
This revision was automatically updated to reflect the committed changes.