mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
main: write a PID file to pylink.pid
This commit is contained in:
parent
c07cfb13df
commit
f85fbd934b
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ __pycache__/
|
|||||||
*~
|
*~
|
||||||
*.save*
|
*.save*
|
||||||
*.db
|
*.db
|
||||||
|
pylink.pid
|
||||||
|
4
main.py
4
main.py
@ -204,6 +204,10 @@ if __name__ == '__main__':
|
|||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
protocols_folder = [os.path.join(os.getcwd(), 'protocols')]
|
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
|
# Import plugins first globally, because they can listen for events
|
||||||
# that happen before the connection phase.
|
# that happen before the connection phase.
|
||||||
utils.plugins.append(coreplugin)
|
utils.plugins.append(coreplugin)
|
||||||
|
Loading…
Reference in New Issue
Block a user