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


Groups > comp.lang.python > #79404

Re: Struggling with python-daemon and subprocess module to work together

Path csiph.com!usenet.pasdenom.info!gegeweb.org!newsfeed.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <drsalists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.020
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'suppose': 0.07; 'executed': 0.09; 'kumar': 0.09; 'subject:module': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'missed': 0.12; 'cc:name:python list': 0.16; 'pty': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'module': 0.19; 'command': 0.22; 'machine': 0.22; 'previously': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'controlling': 0.24; 'tells': 0.24; 'tend': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'figure': 0.32; 'run': 0.32; 'subject:with': 0.35; 'basic': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'virtual': 0.37; 'application': 0.37; 'server': 0.38; 'issue': 0.38; 'either': 0.39; 'skip:* 10': 0.61; 'happen': 0.63; 'to:addr:gmail.com': 0.65; 'due': 0.66; 'side': 0.67; 'believe': 0.68; '20,': 0.68; 'execution.': 0.84; 'imagine': 0.93; 'subject:together': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZR7z42MkbS4VqhzwWFk9d4drzel1s3cP2Fu3lBkq9F4=; b=L+dYeYMv6L5spuw6qlbyYu+Mls6BMXyMpgB/jCGhcQa/rHrzcF1iTRkyZk/8Oo2rL6 1yQAzCHdWTVeq3h5I4j+j8R8B44LOcZDYECXmkbbXkZqQV7+8Z5wG9sfsGWTReHXsL1r jGwWECwD3dENzEfDv/paMykTK3zAVgkiuYIYOIg4DKhi/7HC5eo1hP4aHVirFX025T98 ecxoYBhcS1dvGYdhGPtYWEd0qRdrAW2/fSBLQt783hfsAZfRPJvHOu4ra4fr1ezhXTRN UgKiVJLFq+Y0YZ81D/T9TxqFgkPPXsEUiFy+MAe4tRO+ryWTDQbi9hac4n2VmbpFpi63 wXww==
MIME-Version 1.0
X-Received by 10.152.19.9 with SMTP id a9mr38102514lae.41.1413933661753; Tue, 21 Oct 2014 16:21:01 -0700 (PDT)
In-Reply-To <CAK32T6WO=U-MUW01OEUtmxSv5bsxgQg+0P5k_ReaMaTjPQ6aBQ@mail.gmail.com>
References <CAK32T6WO=U-MUW01OEUtmxSv5bsxgQg+0P5k_ReaMaTjPQ6aBQ@mail.gmail.com>
Date Tue, 21 Oct 2014 16:21:01 -0700
Subject Re: Struggling with python-daemon and subprocess module to work together
From Dan Stromberg <drsalists@gmail.com>
To Praveen Kumar <kumarpraveen.nitdgp@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15050.1413934126.18130.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1413934126 news.xs4all.nl 2929 [2001:888:2000:d::a6]:36284
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:79404

Show key headers only | View raw


On Mon, Oct 20, 2014 at 2:16 AM, Praveen Kumar
<kumarpraveen.nitdgp@gmail.com> wrote:
> I am writing a very basic server side application[0] which get data
> from a client and create a virtual machine using provided data and
> also tells client about what's going on during *virt-install* command
> execution. Previously this basic server is executed using *openvt* but
> I thought it would be nice to have a daemon process for it and used
> python-daemon.
>
> Issue I am facing is after some time server will stop sending data to
> client which suppose to happen in #120 and get error message "Cannot
> run interactive console without a controlling TTY" . I am not able to
> figure out issue is occurred due to module or I missed something
> during daemon initialization.

I believe you either want a pty, to make your interactive application
believe it's on a tty, or a redesign.

Here's some Python pty code:
http://stromberg.dnsalias.org/~strombrg/pypty/

I imagine pexpect might help too, though I tend to favor going
directly to a pty.

HTH

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Struggling with python-daemon and subprocess module to work together Dan Stromberg <drsalists@gmail.com> - 2014-10-21 16:21 -0700

csiph-web