Behaviour of subprocess.Popen, ssh and nohup I don't understand

Adriaan Renting renting at astron.nl
Thu Apr 7 09:11:54 EDT 2011


Thanks, that explains a lot.

Adriaan Renting.


>>> On 4/6/2011 at 07:43 PM, Dan Stromberg <drsalists at gmail.com> wrote:

> On Wed, Apr 6, 2011 at 12:47 AM, Adriaan Renting <renting at astron.nl>
wrote:
>>
>>
>> This solves the problem using stdin=open(os.devnull, 'rb') instead
of
>> stdin=None makes it run even if there is input from stdin in the
>> foreground process.
>>
>> The operating system is Ubuntu 8.04
>> I understood what Suspended (tty input) means. I don't understand
why
>> it waits for input if stdin=None.
>>
>> Thank you for your help.
>>
>> Adriaan Renting.
>> --
>> http://mail.python.org/mailman/listinfo/python-list
> 
> http://docs.python.org/library/subprocess.html
> "With None, no redirection will occur; the child*s file handles
will
> be inherited from the parent."
> 
> When a background process reads from a tty (which is most likely
what
> its inherited stdin is connected to), it gets a SIGTTIN, suspending
> your background process.
> 
> See also "ssh -n".




More information about the Python-list mailing list