RE: Subprocess troubles from a daemon

2012-04-13 Thread Eiríkur Hjartarson
Hi, > -Original Message- > From: python-list-bounces+eirikur.hjartarson=decode...@python.org > [mailto:python-list-bounces+eirikur.hjartarson=decode...@python.org] On > Behalf Of Terry Reedy > Sent: 13. apríl 2012 14:57 > To: python-list@python.org > Subject: Re: Sub

Re: Subprocess troubles from a daemon

2012-04-13 Thread Terry Reedy
On 4/13/2012 7:04 AM, Eiríkur Hjartarson wrote: Hi, I think I have possibly found a bug in the subprocess module. The (potential) bug appears when executing a subprocess from a daemon (after double-forking). This is on RHEL 6.2 with python version 2.6.6. What happens is you use the new 2.7.3

Subprocess troubles from a daemon

2012-04-13 Thread Eiríkur Hjartarson
Hi, I think I have possibly found a bug in the subprocess module. The (potential) bug appears when executing a subprocess from a daemon (after double-forking). This is on RHEL 6.2 with python version 2.6.6. The problem can be demonstrated with the two attached files, both files should be mad

Re: subprocess troubles

2010-01-22 Thread Nobody
On Thu, 21 Jan 2010 11:25:08 +0100, Tomas Pelka wrote: > have a problem with following piece of code: > > -- > import subprocess > > paattern = "python" > cmd = "/usr/bin/locate" > arg1 = " -i" > arg2 = " -d /var/www/books/mlocate.db" > arg3 = str(

Re: subprocess troubles

2010-01-21 Thread Tomas Pelka
On 01/21/2010 11:39 AM, Javier Collado wrote: Hello, If you set shell=False, then I think that arg2 should be separated into two different parts. Also, arg3 could be set just to pattern (no need to add extra spaces or using str function). Best regards, Javier 2010/1/21 Tomas Pelka: Hey

Re: subprocess troubles

2010-01-21 Thread Javier Collado
Hello, If you set shell=False, then I think that arg2 should be separated into two different parts. Also, arg3 could be set just to pattern (no need to add extra spaces or using str function). Best regards, Javier 2010/1/21 Tomas Pelka : > Hey all, > > have a problem with following piece of

subprocess troubles

2010-01-21 Thread Tomas Pelka
Hey all, have a problem with following piece of code: -- import subprocess paattern = "python" cmd = "/usr/bin/locate" arg1 = " -i" arg2 = " -d /var/www/books/mlocate.db" arg3 = str(" " + pattern) p1 = subprocess.Popen([cmd, arg1, arg2, arg3], sh