Re: Calling a Command line tool from an application
Re: Calling a Command line tool from an application
- Subject: Re: Calling a Command line tool from an application
- From: Justin Walker <email@hidden>
- Date: Mon, 11 Apr 2005 14:26:14 -0700
On Apr 11, 2005, at 14:17, Rick Steele wrote:
Can anybody point me to docs which explain calling a command line tool
from an application an providing it argumetns?
There are two ways to do it:
- the low-level API "exec(3)" will give you several ways to exec
a program, with or without both command-line arguments and
environment variables
- system(3) will take a string that represents a command + arguments,
and figure out how to call the appropriate exec system call
The latter has fallen into disrepute due to the potential for security
problems, so I would recommend the former, especially if you plan on
distribute the software to others.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Men are from Earth.
Women are from Earth.
Deal with it.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden