mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
Only write the pid file when --no-pid isn't passed (#633)
Prevents --no-pid from breaking
(cherry picked from commit 30387c9ed5
)
This commit is contained in:
parent
bf9eb8d4ea
commit
28166ed4ee
@ -120,9 +120,10 @@ def _main():
|
|||||||
elif os.name == 'posix':
|
elif os.name == 'posix':
|
||||||
sys.stdout.write("\x1b]2;PyLink %s\x07" % __version__)
|
sys.stdout.write("\x1b]2;PyLink %s\x07" % __version__)
|
||||||
|
|
||||||
# Write the PID file only after forking.
|
if not args.no_pid:
|
||||||
with open(pidfile, 'w') as f:
|
# Write the PID file only after forking.
|
||||||
f.write(str(os.getpid()))
|
with open(pidfile, 'w') as f:
|
||||||
|
f.write(str(os.getpid()))
|
||||||
|
|
||||||
# Load configured plugins
|
# Load configured plugins
|
||||||
to_load = conf.conf['plugins']
|
to_load = conf.conf['plugins']
|
||||||
|
Loading…
Reference in New Issue
Block a user