473,322 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 5116
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.