Mar-12-2020, 07:11 AM
(Mar-12-2020, 07:03 AM)Manikandan_PS Wrote: i am not able to read this output through subprocess.Popen, os.popen and commands.getstatusoutput. commands give error as "syntax error near unexpected token '&' and others give empty string as output and command is running the background successfully though.Maybe show your code...
(Mar-12-2020, 07:03 AM)Manikandan_PS Wrote: subprocess.Popen gives a pid but when killed or terminated i could still see the tail and egrep pid's staying alive.Do you pass
shell=True
? in which case as docs state:Quote:Note that if you set the shell argument to True, this is the process ID of the spawned shell.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs