I want to run a program in another process, get pid this program and child process should be not depended from parent. Please see following Python code:
cmd = 'myPythonProgramm -p param'
pid = subprocess.Popen(cmd, shell = True).pid
But if I kill parent process then also kill child process.
This issue is not exist if I use:
os.system('nohup myPythonProgramm -p param &')
But in this case I can't get child process pid.
How can I run a program in another process, get pid this program and child process should be not depended from parent?