8 lines
224 B
Python
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))
|