This simple Python program :
import threading
import time
import os
def run_test():
print("run_test pid : " + str(os.getpid()))
while True:
time.sleep(100)
print("main pid : " + str(os.getpid()))
thread1 = threading.Thread(target=run_test)
thread1.start()
Starts multiple processes according to htop:
With PIDs 12004 and 12040.
However, there doesn't appear to be any point in the program where the second process is created.
Where does the second process come from ?