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


Groups > comp.lang.python > #8118

Re: How to get return values of a forked process

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@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; 'see:': 0.07; 'subject:process': 0.07; 'pages.': 0.09; 'url:linux': 0.09; 'way;': 0.09; 'in?': 0.16; 'macro,': 0.16; 'cc:addr:python-list': 0.17; 'header:In-Reply-To:1': 0.21; 'say,': 0.22; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'received:209.85.161.46': 0.23; 'received:mail-fx0-f46.google.com': 0.23; 'extract': 0.25; 'received:209.85.161': 0.26; 'message-id:@mail.gmail.com': 0.28; 'typically': 0.28; 'exit': 0.29; 'subject:How': 0.30; 'cc:addr:python.org': 0.30; 'at,': 0.30; 'pasted': 0.30; 'supposed': 0.31; 'url:library': 0.31; "didn't": 0.31; 'does': 0.33; 'received:google.com': 0.37; 'change': 0.37; 'received:209.85': 0.37; 'url:docs': 0.37; 'url:python': 0.38; 'url:org': 0.38; 'but': 0.38; 'docs': 0.38; 'implemented': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'unix': 0.40; 'you.': 0.62; 'url:net': 0.63; 'man': 0.66; 'to:addr:rocketmail.com': 0.84; 'url:os': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=thFTbJvKCMqeQn/fFaNa4oJvXyx028cIQ/ktVm0Li0s=; b=ccebZXwsQh1xo0CrBSEMeoEk4kaFgRN3YaSLuJxYJH4NWfQDmM7+Fq5/bS1KEIe3Hq tAgyD0bwQYY4epLQfX55/UVWxH7NbTdf4joUoi8fuWprIOSvRXr/idtZnNiZV4rL0cyr mPv1rqmQKbKwxtVkhFFry9EQncrVhBa1V7ruE=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=HKPgUTEPWCYzsfZitsMFcCUD7M11JMYZ35P4Qtm/GkUWnqNezbc+O1xpMYqbBRN5cz U7E/+ovz6OUlJjyJTRF5vDkIUT+9KhnWwSHac2TP65N1H1nRWQze9/hBgCSG4FX29YBh GTtndfhxS1hvynUuBWeYTIlsk3IuaywVFCdrY=
MIME-Version 1.0
In-Reply-To <d195a74d-e173-4168-8812-c03fc02e8da7@fr19g2000vbb.googlegroups.com>
References <ae67ad89-86f4-4374-9127-18f0193d23cc@m10g2000yqd.googlegroups.com> <mailman.239.1308682529.1164.python-list@python.org> <d195a74d-e173-4168-8812-c03fc02e8da7@fr19g2000vbb.googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 21 Jun 2011 13:31:28 -0600
Subject Re: How to get return values of a forked process
To Ian <ian.lake@rocketmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.241.1308684719.1164.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 82.94.164.166
X-Trace 1308684720 news.xs4all.nl 49179 [::ffff:82.94.164.166]:34124
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:8118

Show key headers only | View raw


> Where did you find the Unix docs you pasted in?  I didn't find it in
> the man pages.  Thank you.  Based on what you say, I will change my
> os._exit() to sys.exit().

http://docs.python.org/library/os.html#os.wait
http://docs.python.org/library/os.html#os.waitpid

I don't know what man pages you were looking at, but the Unix system
call does work the same way; to extract the exit status in C you're
supposed to use the WEXITSTATUS(status) macro, which is typically
implemented as ((status >> 8) & 0377).  See:

http://linux.die.net/man/2/waitpid

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


Thread

How to get return values of a forked process Ian <ian.lake@rocketmail.com> - 2011-06-21 11:26 -0700
  Re: How to get return values of a forked process Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-21 12:54 -0600
    Re: How to get return values of a forked process Ian <ian.lake@rocketmail.com> - 2011-06-21 12:17 -0700
      Re: How to get return values of a forked process Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-21 13:31 -0600
      Re: How to get return values of a forked process Chris Torek <nospam@torek.net> - 2011-06-21 20:11 +0000

csiph-web