472,782 Members | 3,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

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

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

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

Similar topics

1
by: vincent delft | last post by:
I'm using Python 2.2.2 the standard cgihttpserver (example given in the python doc). All HTML and CGI work. BUT by writing a simple python-cgi script like this : " #!/usr/bin/env python...
3
by: Java Boy | last post by:
HI there... I compile the following code(as root) and sets the setuid bit... as it gives a shell to any user but when the setuid bit is set the shell should have the privileges of root but in my...
8
by: MackS | last post by:
Hello! This question does not concern programming in python, but how to manage python processes. Is there a way to "name" a python process? At least on Linux, if I have two python programs...
2
by: goodnamesalltaken | last post by:
Hello fellow python users, I've been working on a basic implementation of a privilege separated web server, and I've goto the point of running a basic cgi script. Basically when the execCGI...
25
by: broeks | last post by:
I'm trying to create an array of character arrays. I would use strings, but the function I need to feed into looks like this int execve(const char *filename, char *const argv , char *const envp...
4
by: glmlima | last post by:
Hi, I need to implement a prompt of commands (mere academic project). The function presents errors in the call execve, as parameter. It follows the code below.... thanks. #include "stdio.h"...
0
by: glmlima | last post by:
I need to implement a prompt of commands (mere academic project). The function presents errors in the call execve, as parameter. It follows the code below. I´m using gcc... thanks. #include...
4
by: neojia | last post by:
hi, I am trying to figure out the system call from user space to kernel space. So, I read glibc wrapper first. But I cannot figure out the exact meaning of INTERNAL_SYSCALL for execve system...
1
by: yogamatt1970 | last post by:
I have some code which runs on a number of different machines, however I see problems on one particular Solaris box. When I call Popen.wait(), the following exception is raised: .. . . File...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.