Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2714 > unrolled thread

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

Started byDan Stromberg <drsalists@gmail.com>
First post2011-04-06 10:43 -0700
Last post2011-04-06 10:43 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Behaviour of subprocess.Popen, ssh and nohup I don't understand Dan Stromberg <drsalists@gmail.com> - 2011-04-06 10:43 -0700

#2714 — Re: Behaviour of subprocess.Popen, ssh and nohup I don't understand

FromDan Stromberg <drsalists@gmail.com>
Date2011-04-06 10:43 -0700
SubjectRe: Behaviour of subprocess.Popen, ssh and nohup I don't understand
Message-ID<mailman.82.1302111802.9059.python-list@python.org>
On Wed, Apr 6, 2011 at 12:47 AM, Adriaan Renting <renting@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".

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web