olzhis.blogg.se

Python subprocess start background process
Python subprocess start background process













python subprocess start background process python subprocess start background process

Nohup /opt/someDir/startSomeServerApplication.sh >$ | grep "Server started in RUNNING mode" | wc -l)

python subprocess start background process

LOGFILE="/opt/scripts/bin/logs/SomeServerApplicationStart.log" I have already tried to use "nohup startCommand &" in front of the startCommand but that did not work as expected.Īs a workaround I now use the following bash script to call the application's start script: #!/bin/bash The problem is, that the startup script of one application stays in foreground and so p.communicate() waits forever. I am starting the applications' startup scripts by p = subprocess.Popen(startCommand, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) The program facilitates starting and stopping different applications running on a server providing the user common commands (like starting and stopping system services on a Linux server). I am currently writing my first python program (in Python 2.6.6).















Python subprocess start background process