Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Posix call (execve) breaks mercurial?

Reply
Thread Tools

Re: Posix call (execve) breaks mercurial?

 
 
Wayne Werner
Guest
Posts: n/a
 
      10-11-2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Posix call (execve) breaks mercurial? Antoine Pitrou Python 0 10-12-2012 01:31 PM
Posix call (execve) breaks mercurial? Wayne Werner Python 0 10-11-2012 11:10 PM
Capturing STDOUT from a system call (POSIX) into an array Venks Ruby 10 12-07-2007 01:01 AM
POSIX system() call return value jensthiede@gmail.com C Programming 4 10-23-2006 08:32 PM
posix vs perl regular expressions RN Perl 0 09-10-2003 06:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57