Battleship_server/pider.py
BRNSystems 440e0e2ecf add:
ships,
abilities,
ship pieces,
map generator,
ship placer

separate pid writer to another module
2022-01-19 18:07:16 +01:00

8 lines
224 B
Python

#always use absolute paths
import os
def write_pid():
pid = os.getpid()
with open('/tmp/battleship_server.pid', 'w') as f:
f.write(str(pid))
print('Hello my(i \'m battleship server) pid is ' + str(pid))