From: Sage Weil Date: Fri, 14 Jun 2013 23:29:10 +0000 (-0700) Subject: ceph-disk: clear TERM to avoid libreadline hijinx X-Git-Tag: v0.65~48^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e538829f16ce19d57d63229921afa01cc687eb86;p=ceph.git ceph-disk: clear TERM to avoid libreadline hijinx The weird output from libreadline users is related to the TERM variable. Signed-off-by: Sage Weil --- diff --git a/src/ceph-disk b/src/ceph-disk index 26097c8e0897..3f15a9a1d220 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -57,6 +57,11 @@ INIT_SYSTEMS = [ 'auto', ] +# Nuke the TERM variable to avoid confusing any subprocesses we call. +# For example, libreadline will print weird control sequences for some +# TERM values. +if 'TERM' in os.environ: + del os.environ['TERM'] LOG_NAME = __name__ if LOG_NAME == '__main__':