[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: running scripts



On Friday 02 November 2007 12:29:23 Junior wrote:
> I'm hoping someone attempt this before. I can run a script from my C
> program but how do I get the script to return a variable or struct to the
> program? Has anyone done this before and can point me to an example?

The most "typical" way if you are just running a script and using it's 
output is to use popen and read/parse the process's stdout. 

You can also communicate over sockets, pipes, shared memory, XML-RPC, temp 
files, etc. There are a billion ways to make two processes communicate, 
some better than others. =)

-- 
Wesley J. Landaker <wjl@icecavern.net> <xmpp:wjl@icecavern.net>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: