fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Running a fabric script in the background, without stdin


From: Jeff Forcier
Subject: Re: [Fab-user] Running a fabric script in the background, without stdin
Date: Sun, 22 Apr 2012 13:32:18 -0700

On Sun, Apr 22, 2012 at 10:37 AM, Daniel Gonzalez <address@hidden> wrote:

> Is there a mechanism to force fabric to *not* use stdin?

Not at present -- there's an option to abort if it tries to do other
stdin-using things such as prompting the user for hostnames or
passwords, but it's not tied into the general interactivity feature
which is what's trying to open stdin in your case.

One thing that does bother me about your traceback, is that the
sys.stdin.read() line causing the IOError should only be firing if the
`select` statement on sys.stdin implied there's data to be read:

    https://github.com/fabric/fabric/blob/1.4/fabric/io.py#L154

I would have expected that to not be the case if sys.stdin is actually
unavailable/not a tty. It would be great if we could get more info
about what's happening there in your scenario.

I agree that in normal circumstances Fabric should not attempt to
access stdin if it's not actually there, so if nothing seems wrong
with the way we're using `select` then I'd be open to patching the
inner block to detect & avoid read()ing from a non-functioning stdin.

Best,
Jeff

-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]