We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc67f0f commit dead10cCopy full SHA for dead10c
source/zimonGrafanaIntf.py
@@ -664,7 +664,11 @@ def main(argv):
664
try:
665
cherrypy.engine.start()
666
logger.info("server started")
667
- logger.debug("Server started PID: {}".format(os.getpid()))
+ with open("/proc/{}/stat".format(os.getpid())) as f:
668
+ data = f.read()
669
+ foreground_pid_of_group = data.rsplit(" ", 45)[1]
670
+ is_in_foreground = str(os.getpid()) == foreground_pid_of_group
671
+ logger.debug("Server PID: {}. Process started in the foreground: {}".format(os.getpid(), is_in_foreground))
672
cherrypy.engine.block()
673
except TypeError as e:
674
logger.error("Server request could not be proceed. Reason: {}".format(e))
0 commit comments