From: Oleg Broytman Date: Fri, 4 Jul 2014 22:09:10 +0000 (+0400) Subject: Pass subproc_* parameters to the subprocess X-Git-Tag: v4.6.0~13 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=54576c927fe40509d146212dce65c555148a22c5;p=bookmarks_db.git Pass subproc_* parameters to the subprocess --- diff --git a/Robots/bkmk_rforking.py b/Robots/bkmk_rforking.py index e1b4ee2..0d41c74 100644 --- a/Robots/bkmk_rforking.py +++ b/Robots/bkmk_rforking.py @@ -53,7 +53,15 @@ class robot_forking(Robot): global _set_subproc if _set_subproc: _set_subproc = False - os.environ['BKMK_ROBOT'] = self.subproc + + subproc = self.subproc + subproc_attrs = [] + for attr in dir(self): + if attr.startswith('subproc_'): + subproc_attrs.append((attr[len('subproc_'):], getattr(self, attr))) + if subproc_attrs: + subproc += ':' + ':'.join(['='.join((k,v)) for k,v in subproc_attrs]) + os.environ['BKMK_ROBOT'] = subproc if not check_subp: restart_subp(self.log) # Not restart, just start afresh