Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Aug 2019 01:14:11 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351203 - head/usr.sbin/periodic
Message-ID:  <201908190114.x7J1EBJL092735@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Mon Aug 19 01:14:11 2019
New Revision: 351203
URL: https://svnweb.freebsd.org/changeset/base/351203

Log:
  periodic: replace "tty" with "test -t 0"
  
  Apparently using tty for this purpose has been deprecated since 4.4 Lite.
  
  Reviewed by:	cy
  MFC after:	1 month
  Differential Revision:	https://reviews.freebsd.org/D21318

Modified:
  head/usr.sbin/periodic/periodic.sh

Modified: head/usr.sbin/periodic/periodic.sh
==============================================================================
--- head/usr.sbin/periodic/periodic.sh	Mon Aug 19 00:46:31 2019	(r351202)
+++ head/usr.sbin/periodic/periodic.sh	Mon Aug 19 01:14:11 2019	(r351203)
@@ -84,7 +84,7 @@ else
 	# remove the file.
 	remove_periodic_anticongestion_file=no
 fi
-if tty > /dev/null 2>&1; then
+if [ -t 0 ]; then
 	export PERIODIC_IS_INTERACTIVE=1
 fi
 tmp_output=`mktemp ${TMPDIR:-/tmp}/periodic.XXXXXXXXXX`



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908190114.x7J1EBJL092735>