This commit is contained in:
Bruno Rybársky 2022-01-18 14:37:03 +01:00
parent d94e2ff026
commit 0a0b14f065

@ -1,4 +1,5 @@
#import os #import os
#always use absolute paths
import os import os
#get pid #get pid
@ -7,4 +8,4 @@ pid = os.getpid()
#write pid to file /tmp/battleship_server.pid #write pid to file /tmp/battleship_server.pid
with open('/tmp/battleship_server.pid', 'w') as f: with open('/tmp/battleship_server.pid', 'w') as f:
f.write(str(pid)) f.write(str(pid))
print('battleship_server PID: ' + str(pid)) print('Hello my(battleship_server) pid is ' + str(pid))