summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2013-12-14 22:30:29 +0000
committerHarm Weites <harm@weites.com>2013-12-14 22:30:29 +0000
commit76756d5985cac6d0d8eafbbc336dc140cb3ecb1d (patch)
tree5cb15d579bf7b6c251d64736c59ab81f097246e0 /cloudinit/config
parent8a2b80adfb66f9036dc617ff65b7f6ab4464ca5d (diff)
downloadvyos-cloud-init-76756d5985cac6d0d8eafbbc336dc140cb3ecb1d.tar.gz
vyos-cloud-init-76756d5985cac6d0d8eafbbc336dc140cb3ecb1d.zip
change: Use a proper signal instead of 'just' 0.
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_power_state_change.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py
index 8efef24b..2797b3d9 100644
--- a/cloudinit/config/cc_power_state_change.py
+++ b/cloudinit/config/cc_power_state_change.py
@@ -22,6 +22,7 @@ from cloudinit import util
import errno
import os
import re
+import signal
import subprocess
import time
@@ -36,7 +37,7 @@ EXIT_FAIL = 254
def givecmdline(pid):
# Check if this pid still exists by sending it the harmless 0 signal.
try:
- os.kill(pid, 0)
+ os.kill(pid, signal.SIG_DFL)
except OSError:
return None
else: