Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python': 0.09; 'skip:` 30': 0.09; 'did:': 0.16; 'fine.': 0.16; 'oct': 0.16; 'parameter,': 0.16; 'posix': 0.16; 'subprocess': 0.16; 'weird.': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'code,': 0.18; 'code.': 0.20; 'subject:) ': 0.20; 'import': 0.21; 'os,': 0.22; 'tried': 0.25; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'looks': 0.26; 'compiled': 0.27; 'environment.': 0.27; 'there.': 0.28; 'all.': 0.28; 'fine': 0.28; 'run': 0.28; 'environment': 0.29; 'issues.': 0.29; 'worked': 0.30; 'code': 0.31; 'could': 0.32; 'skip:s 30': 0.33; 'to:addr:python-list': 0.33; 'subject:?': 0.35; 'but': 0.36; "i'll": 0.36; 'charset:us-ascii': 0.36; 'problems': 0.36; 'subject: (': 0.36; 'monday': 0.37; 'passed': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'called': 0.39; 'where': 0.40; 'back': 0.62; 'from:addr:wayne': 0.84 Date: Thu, 11 Oct 2012 18:33:49 -0500 (CDT) From: Wayne Werner X-X-Sender: wayne@gilgamesh To: python-list@python.org Subject: Re: Posix call (execve) breaks mercurial? In-Reply-To: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349998465 news.xs4all.nl 6885 [2001:888:2000:d::a6]:47453 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31139 On Thu, 11 Oct 2012, Wayne Werner wrote: > So here's where things got weird. I could call > `subprocess.check_output(['hg', 'root'])`, and things worked just fine. But > when I added the env parameter, I got the untrusted issues. So if I did: > > import os, subprocess > > # Works just fine > subprocess.check_output(['hg', 'root']) > > # Gives untrusted issues > subprocess.check_output(['hg', 'root'], env=os.environ) So... curiouser and curiouser - it looks like it's not *actually* execve's fault after all. I just compiled the code from the man page, tweaked it to run 'hg root', and passed it a new environment. No problems. Well, then I manually called the posix one from Python and thing worked fine. *Then* I actually tried the above code, and *it* worked fine. However I *still* get problems with the post-review code. So it looks like when I get back to work on Monday I'll be looking to see what the difference in environment is there. -Wayne