470,864 Members | 1,844 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,864 developers. It's quick & easy.


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?
Dec 26 '07 #1
2 4990
9,208 Expert Mod 8TB
Use the redirection operator on the command line:

Expand|Select|Wrap|Line Numbers
  1. myprog.exe  >output.txt
That will divert stdout to the disc file.
Dec 26 '07 #2
671 Expert 512MB
Just to make sure, you do realize that exec* family of functions replace the current process, right?
Dec 26 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by vincent delft | last post: by
3 posts views Thread by Java Boy | last post: by
8 posts views Thread by MackS | last post: by
2 posts views Thread by goodnamesalltaken | last post: by
25 posts views Thread by broeks | last post: by
4 posts views Thread by glmlima | last post: by
reply views Thread by glmlima | last post: by
4 posts views Thread by neojia | last post: by
1 post views Thread by yogamatt1970 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.