Quantcast
Channel: Cross-platform background silent process execution in python - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Cross-platform background silent process execution in python

$
0
0

Within a python program I need to run a command in background, without displaying its output. Therefore I'm doing os.system("nohup "+ command +"&") for now.

Edit : command shouldn't be killed/closed when python program exits.

However that will only work on Linux, and the content of the file will end up in nohup.out but I don't need it there. Therefore I'm looking for a platform independent solution.os.spawnlp(os.P_DETACH, command) doesn't work, even with the *p version so as to be able not to enter full path to application.

NB. I know that command is generally platform dependent, but that's not the point of my question.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images