added pid to forks sampl

pull/39/head
Ciro 2022-05-31 18:57:36 -03:00
rodzic 6faf4a39bf
commit d650fa1aa1
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ import multiprocessing
def run_app(): def run_app():
app = App() app = App()
app.get("/", lambda res, req: res.end("Hello World socketify from Python!")) app.get("/", lambda res, req: res.end("Hello World socketify from Python!"))
app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) app.listen(3000, lambda config: print("PID %d Listening on port http://localhost:%d now\n" % (os.getpid(), config.port)))
app.run() app.run()
def create_fork(): def create_fork():