Navigation Menu

Skip to content

Commit

Permalink
Check for ppid on daeamonization check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Place committed Oct 29, 2015
1 parent ef302e3 commit 546229e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions salt/utils/parsers.py
Expand Up @@ -1589,8 +1589,9 @@ def check_running(self):
Check if a pid file exists and if it is associated with
a running process.
'''
if self.check_pidfile():
return self.is_daemonized(self.get_pidfile())
pid = self.get_pidfile()
if self.check_pidfile() and self.is_daemonized(pid) and not os.getppid() == pid:
return True


class MinionOptionParser(six.with_metaclass(OptionParserMeta, MasterOptionParser)): # pylint: disable=no-init
Expand Down

0 comments on commit 546229e

Please sign in to comment.