From: Jason Stubbs <jstubbs@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [7/7] portage_exec cleanups
Date: Sat, 29 Oct 2005 20:01:37 +0900 [thread overview]
Message-ID: <200510292001.37237.jstubbs@gentoo.org> (raw)
In-Reply-To: <200510291934.13207.jstubbs@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Remove the unused code block prior to execve'ing and all the superfluous
exits. To be specific, if os.execve succeeds then python is gone. If it
doesn't succeed then an exception will be raised. The previous code raised
the exception meaning that python would exit (on the child thread side) and
portage exit handlers would be called. The os._exit(1) and friends weren't
ever called at all.
[-- Attachment #2: 07-execvp-failure-handling.patch --]
[-- Type: text/x-diff, Size: 880 bytes --]
--- portage_exec.py.orig 2005-10-29 19:21:38.000000000 +0900
+++ portage_exec.py 2005-10-29 19:22:13.000000000 +0900
@@ -100,28 +100,12 @@
os.setuid(uid)
if umask:
os.umask(umask)
- try:
- # XXX: We would do this to stop ebuild.sh from getting any
- # XXX: output, and consequently, we'd get to handle the sigINT.
- #os.close(sys.stdin.fileno())
- pass
- except SystemExit, e:
- raise
- except:
- pass
try:
- #print "execing", myc, myargs
os.execve(myc,myargs,env)
- except SystemExit, e:
- raise
except Exception, e:
- raise str(e)+":\n "+myc+" "+string.join(myargs)
- # If the execve fails, we need to report it, and exit
- # *carefully* --- report error here
- os._exit(1)
- sys.exit(1)
- return # should never get reached
+ print str(e)+":\n "+myc+" "+string.join(myargs)
+ os._exit(1)
if logfile:
os.close(pw)
next prev parent reply other threads:[~2005-10-29 11:01 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-23 6:45 [gentoo-portage-dev] [Bug 104705] emerge doesn't print complete error message Jason Stubbs
2005-10-29 10:34 ` [gentoo-portage-dev] [0/7] portage_exec cleanups (WAS: [Bug 104705] emerge doesn't print complete error message) Jason Stubbs
2005-10-29 10:41 ` [gentoo-portage-dev] [1/7] portage_exec cleanups Jason Stubbs
2005-10-29 10:44 ` [gentoo-portage-dev] [2/7] " Jason Stubbs
2005-10-29 10:49 ` [gentoo-portage-dev] [3/7] " Jason Stubbs
2005-10-29 14:22 ` Brian Harring
2005-10-29 15:06 ` Jason Stubbs
2005-10-29 15:17 ` Brian Harring
2005-10-29 10:52 ` [gentoo-portage-dev] [4/7] " Jason Stubbs
2005-10-29 11:03 ` Jason Stubbs
2005-10-29 10:56 ` [gentoo-portage-dev] [5/7] " Jason Stubbs
2005-10-29 15:25 ` Jason Stubbs
2005-10-29 16:04 ` Brian Harring
2005-10-29 16:40 ` Jason Stubbs
2005-10-29 17:17 ` Jason Stubbs
2005-10-29 17:17 ` Brian Harring
2005-10-29 17:28 ` Jason Stubbs
2005-10-29 17:20 ` Jason Stubbs
2005-10-29 17:28 ` Brian Harring
2005-10-29 10:57 ` [gentoo-portage-dev] [6/7] " Jason Stubbs
2005-10-29 11:01 ` Jason Stubbs [this message]
2005-10-29 17:32 ` [gentoo-portage-dev] [0/7] portage_exec cleanups (WAS: [Bug 104705] emerge doesn't print complete error message) Jason Stubbs
2005-10-29 17:38 ` Jason Stubbs
2005-10-30 7:03 ` Jason Stubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200510292001.37237.jstubbs@gentoo.org \
--to=jstubbs@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox