Posix call (execve) breaks mercurial?

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

  1. Wayne Werner

    Wayne Werner Guest

    So... this is certainly the deepest I've got to dig into any source code.

    I'm experimenting with Review Board for code reviews, and trying to get it
    set up/working here at work. When using post-review, however, I started
    getting issues with untrusted users - even though they were set to trusted
    in my ~/.hgrc and things worked fine otherwise.

    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)


    Long story short, I dug around the source code and ended up at the POSIX
    execve function. I've been reading the manpages, but nothing seems to pop
    out at me as "hey, this should/shouldn't work!".

    Does anyone know what's going on here, or where I should go for more help?

    Thanks,
    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:
    390
    Bob Hauck
    Aug 7, 2003
  2. Replies:
    2
    Views:
    535
  3. execve system call

    , Mar 26, 2007, in forum: C Programming
    Replies:
    4
    Views:
    721
    Kenny McCormack
    Mar 27, 2007
  4. Wayne Werner
    Replies:
    0
    Views:
    140
    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:
    119
    Antoine Pitrou
    Oct 12, 2012
Loading...

Share This Page