execve()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scoobydoo666
    New Member
    • Dec 2007
    • 10

    #1

    execve()

    Hi
    I want to execute a command using execve() from my program. Is it possible to get the output redirected to a buffer/file like popen() does?
    Thanks
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Use the redirection operator on the command line:

    [code=c]
    myprog.exe >output.txt
    [/code]

    That will divert stdout to the disc file.

    Comment

    • oler1s
      Recognized Expert Contributor
      • Aug 2007
      • 671

      #3
      Just to make sure, you do realize that exec* family of functions replace the current process, right?

      Comment

      Working...