Re: Posix call (execve) breaks mercurial?

Discussion in 'Python' started by Wayne Werner, Oct 12, 2012.

  1. Wayne Werner

    Wayne Werner Guest

    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
     
    Wayne Werner, Oct 12, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Java Boy

    execve problem???

    Java Boy, Aug 7, 2003, in forum: C Programming
    Replies:
    3
    Views:
    395
    Bob Hauck
    Aug 7, 2003
  2. Replies:
    2
    Views:
    546
  3. execve system call

    , Mar 26, 2007, in forum: C Programming
    Replies:
    4
    Views:
    727
    Kenny McCormack
    Mar 27, 2007
  4. Wayne Werner

    Posix call (execve) breaks mercurial?

    Wayne Werner, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    149
    Wayne Werner
    Oct 12, 2012
  5. Antoine Pitrou

    Re: Posix call (execve) breaks mercurial?

    Antoine Pitrou, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    123
    Antoine Pitrou
    Oct 12, 2012
Loading...

Share This Page