RHEL6: disable stdin to fix shell session hang on killing tee pipe

This commit is contained in:
Denys Havrysh 2017-01-19 10:21:27 +02:00
parent 2130be1049
commit 2ae905b5d4

View file

@ -3754,9 +3754,9 @@ install_centos_restart_daemons() {
return 1
fi
elif [ -f /etc/init.d/salt-$fname ]; then
# Still in SysV init!?
/etc/init.d/salt-$fname stop > /dev/null 2>&1
/etc/init.d/salt-$fname start
# Disable stdin to fix shell session hang on killing tee pipe
service salt-$fname stop < /dev/null > /dev/null 2>&1
service salt-$fname start < /dev/null
elif [ -f /usr/bin/systemctl ]; then
# CentOS 7 uses systemd
/usr/bin/systemctl stop salt-$fname > /dev/null 2>&1