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:
parent
c07cfb13df
commit
f85fbd934b
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ __pycache__/
|
||||
*~
|
||||
*.save*
|
||||
*.db
|
||||
pylink.pid
|
||||
|
4
main.py
4
main.py
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user