From e538829f16ce19d57d63229921afa01cc687eb86 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Jun 2013 16:29:10 -0700 Subject: [PATCH] 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 --- src/ceph-disk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ceph-disk b/src/ceph-disk index 26097c8e08973..3f15a9a1d2203 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__': -- 2.39.5