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


Groups > comp.lang.python > #31139 > unrolled thread

Re: Posix call (execve) breaks mercurial?

Started byWayne Werner <wayne@waynewerner.com>
First post2012-10-11 18:33 -0500
Last post2012-10-11 18:33 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Posix call (execve) breaks mercurial? Wayne Werner <wayne@waynewerner.com> - 2012-10-11 18:33 -0500

#31139 — Re: Posix call (execve) breaks mercurial?

FromWayne Werner <wayne@waynewerner.com>
Date2012-10-11 18:33 -0500
SubjectRe: Posix call (execve) breaks mercurial?
Message-ID<mailman.2073.1349998465.27098.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web