mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #33941 from cachedout/issue_33927
Don't call os.getppid() on Windows
This commit is contained in:
commit
5f4ef46d2f
1 changed files with 7 additions and 2 deletions
|
@ -912,8 +912,13 @@ class DaemonMixIn(six.with_metaclass(MixInMeta, object)):
|
|||
'''
|
||||
if self.check_pidfile():
|
||||
pid = self.get_pidfile()
|
||||
if self.check_pidfile() and self.is_daemonized(pid) and not os.getppid() == pid:
|
||||
return True
|
||||
if not salt.utils.is_windows():
|
||||
if self.check_pidfile() and self.is_daemonized(pid) and not os.getppid() == pid:
|
||||
return True
|
||||
else:
|
||||
# We have no os.getppid() on Windows. Best effort.
|
||||
if self.check_pidfile() and self.is_daemonized(pid):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_daemonized(self, pid):
|
||||
|
|
Loading…
Add table
Reference in a new issue