chiark
/
gitweb
/
~ian
/
hippotat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
config: fix client config (no SERVER)
[hippotat.git]
/
hippotatd
diff --git
a/hippotatd
b/hippotatd
index 834dc5d473169631e3885426ada81f4dd7c2cb37..fe10eeca6166186c49af06ae6da93d8b45a35dde 100755
(executable)
--- a/
hippotatd
+++ b/
hippotatd
@@
-296,7
+296,8
@@
def process_cfg(_opts, putative_servers, putative_clients):
global c
c = ConfigResults()
global c
c = ConfigResults()
- c.server = cfg.get('SERVER','server')
+ try: c.server = cfg.get('SERVER','server')
+ except NoOptionError: c.server = 'SERVER'
cfg_process_common(c, c.server)
cfg_process_saddrs(c, c.server)
cfg_process_common(c, c.server)
cfg_process_saddrs(c, c.server)
@@
-400,16
+401,15
@@
def daemonise():
if grandchildpid:
# we are the intermediate child
if opts.pidfile is not None:
if grandchildpid:
# we are the intermediate child
if opts.pidfile is not None:
- print(grandchildpid, file=p
f
h)
- p
f
h.close()
+ print(grandchildpid, file=p
idfile_
h)
+ p
idfile_
h.close()
os._exit(0)
os._exit(0)
- mypid = os.getpid()
-
pf
h.close()
+ if opts.pidfile is not None:
+
pidfile_
h.close()
logger = subprocess.Popen(['logger','-d',
logger = subprocess.Popen(['logger','-d',
- '-t','hippotat(stderr)',
- '--id=%d' % mypid,
+ '-t','hippotat[%d](stderr)' % os.getpid(),
'-p',opts.syslogfacility + '.err'],
stdin=subprocess.PIPE,
stdout=subprocess.DEVNULL,
'-p',opts.syslogfacility + '.err'],
stdin=subprocess.PIPE,
stdout=subprocess.DEVNULL,