This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: help spawning/executing a command line utility
- From: Ian Lance Taylor <iant at google dot com>
- To: jeffreyholle at bellsouth dot net
- Cc: gcc-help at gcc dot gnu dot org
- Date: 24 Jul 2006 11:08:08 -0700
- Subject: Re: help spawning/executing a command line utility
- References: <ea3211$cev$1@sea.gmane.org>
Jeffrey Holle <jeffreyholle@bellsouth.net> writes:
> I'm using gcc v4.0.1 on Ubuntu Linux.
>
> I want to incorporate calls to command line utilities in my C++ for
> test purposes. These utilities require parameters, but return no
> information to my C++ program.
>
> I can't find the proper function to use. spawn/execute/pexecute?
>
> All I've found in my /usr/include directory is spawn.h, and it
> includes a bunch of functions starting with posix_. Before I start
> playing around with these "undocumented" functions, could somebody:
>
> - tell me the easiest way.
> - the necessary library to link to.
> - where any online documentation is located at?
This is not a gcc question. It is a general Unix programming
questions. gcc-help is the wrong mailing list for this sort of
question.
You probably want to look into the execve() or system() calls.
Ian