ensure input/output/stderr are handled properly for background process

This commit is contained in:
Dustin Kirkland 2013-07-09 08:45:17 -05:00
commit b02906d640
2 changed files with 2 additions and 2 deletions

2
debian/changelog vendored
View file

@ -3,7 +3,7 @@ byobu (5.44) unreleased; urgency=low
* usr/lib/byobu/wifi_quality: * usr/lib/byobu/wifi_quality:
- minor fix for wifi quality printing, sometimes = and sometimes : - minor fix for wifi quality printing, sometimes = and sometimes :
* usr/lib/byobu/include/shutil: * usr/lib/byobu/include/shutil:
- 1 second should be long enough for finding metadata - ensure input/output/stderr are handled properly for background process
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 02 Jun 2013 00:15:10 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Sun, 02 Jun 2013 00:15:10 -0500

View file

@ -218,7 +218,7 @@ metadata_available() {
# Must seed the cache # Must seed the cache
if [ -e /etc/ec2_version ] || [ -e /usr/sbin/update-grub-legacy-ec2 ]; then if [ -e /etc/ec2_version ] || [ -e /usr/sbin/update-grub-legacy-ec2 ]; then
# This *looks* like a machine with metadata, so background a potentially slow check # This *looks* like a machine with metadata, so background a potentially slow check
wget -q -O "$cache" --timeout=1 --tries=1 http://169.254.169.254 2>/dev/null & wget -q -O "$cache" --timeout=10 --tries=1 http://169.254.169.254 2>/dev/null </dev/null >/dev/null &
sleep 0.02 sleep 0.02
[ -s "$cache" ] && x=1 [ -s "$cache" ] && x=1
fi fi