From 38a7ada4476f6b4b88dfaeaae8f1f11f36d80be3 Mon Sep 17 00:00:00 2001 From: BRNSystems <70092437+BRNSystems@users.noreply.github.com> Date: Tue, 18 Jan 2022 14:39:41 +0100 Subject: [PATCH] add while True --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 4e16aad..bfcf0df 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ #import os #always use absolute paths import os +import time #get pid pid = os.getpid() @@ -8,4 +9,6 @@ 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('Hello my(battleship_server) pid is ' + str(pid)) \ No newline at end of file +print('Hello my(battleship_server) pid is ' + str(pid)) +while True: + time.sleep(1) \ No newline at end of file