G
G
geocoder2012-09-14 17:47:15
Python
geocoder, 2012-09-14 17:47:15

How to start a system process and exit?

Faced the problem of launching system processes from Python.

I run them with the usual subprocess.Popen(command, shell = True, stdout = PIPE, stderr = STDOUT) so as not to wait for them to finish, but when the script exits, they all die (this seems to be logical).

How can I start a process from a Python script and exit? However, he must continue to work in the system.
I will cut them down later, saving their PIDs in advance.

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sicness, 2012-09-14
@gecoder

Maybe try running through the nohup system command? For a console, this is ideal, and probably will suit you.

G
gecoder, 2012-09-14
@gecoder

Thank you. The nohup team helped.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question