From 0342ee7f62ebfd69a40e40c0ea4f0dacf040fc7a Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Tue, 10 Jul 2012 14:31:01 -0400 Subject: [PATCH] Fix typos. --- zipline/core/component.py | 4 ++++ zipline/core/monitor.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/zipline/core/component.py b/zipline/core/component.py index e7a1bfd0..40a57960 100644 --- a/zipline/core/component.py +++ b/zipline/core/component.py @@ -196,6 +196,10 @@ class Component(object): The core logic of the all components is run here. """ + log.info("Start %r" % self) + log.info("Pid %s" % os.getpid()) + log.info("Group %s" % os.getpgrp()) + self.start_tic = time.time() self.done = False # TODO: use state flag diff --git a/zipline/core/monitor.py b/zipline/core/monitor.py index 7b742627..1edf1927 100644 --- a/zipline/core/monitor.py +++ b/zipline/core/monitor.py @@ -6,6 +6,7 @@ import gevent import itertools import logbook import gevent_zeromq +from setproctitle import setproctitle from signal import SIGHUP, SIGINT from collections import OrderedDict @@ -158,6 +159,7 @@ class Controller(object): def run(self): self.running = True self.init_zmq(self.zmq_flavor) + setproctitle('Monitor') self.state = CONTROL_STATES.INIT @@ -370,7 +372,7 @@ class Controller(object): it. """ if not self.nosignals: - ppid = os.getpid() + ppid = os.getppid() log.warning("Sending SIGHUP") os.kill(ppid, SIGHUP) else: