Page MenuHomeFreeBSD

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

Authored by asomers on Aug 18 2019, 5:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 7, 3:19 PM
Unknown Object (File)
Thu, Jan 30, 2:17 AM
Unknown Object (File)
Wed, Jan 29, 8:02 PM
Unknown Object (File)
Wed, Jan 29, 4:49 PM
Unknown Object (File)
Fri, Jan 24, 4:48 PM
Unknown Object (File)
Fri, Jan 24, 11:20 AM
Unknown Object (File)
Fri, Jan 24, 7:10 AM
Unknown Object (File)
Wed, Jan 22, 10:23 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested changes to this revision.Aug 18 2019, 6:41 PM
cy added inline comments.
usr.sbin/periodic/periodic.sh
87 ↗(On Diff #60971)

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 ↗(On Diff #60975)

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 ↗(On Diff #60975)

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.