3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

main: write a PID file to pylink.pid

This commit is contained in:
James Lu 2015-07-25 16:57:21 -07:00
parent c07cfb13df
commit f85fbd934b
2 changed files with 5 additions and 0 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ __pycache__/
*~
*.save*
*.db
pylink.pid

View File

@ -204,6 +204,10 @@ if __name__ == '__main__':
sys.exit(2)
protocols_folder = [os.path.join(os.getcwd(), 'protocols')]
# Write a PID file.
with open('pylink.pid', 'w') as f:
f.write(str(os.getpid()))
# Import plugins first globally, because they can listen for events
# that happen before the connection phase.
utils.plugins.append(coreplugin)