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

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 2011-06-21 13:31 -0600
Subject Re: How to get return values of a forked process
Newsgroups comp.lang.python
Message-ID <mailman.241.1308684719.1164.python-list@python.org> (permalink)

Show all headers | 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