From d94e2ff026eb95079839c89496c5220cfeb6f46e Mon Sep 17 00:00:00 2001 From: BRNSystems <70092437+BRNSystems@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:33:53 +0100 Subject: [PATCH] basics --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..b003801 --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +#import os +import os + +#get pid +pid = os.getpid() + +#write pid to file /tmp/battleship_server.pid +with open('/tmp/battleship_server.pid', 'w') as f: + f.write(str(pid)) +print('battleship_server PID: ' + str(pid)) \ No newline at end of file