[comp.lang.c] Child processes

ojpotter@fred.cs.washington.edu (07/05/90)

Please forgive me if this an extremely easy problem to fix but I have gone
through all the reference manuals I have and talked to everyone I know who
knows C.

My problem is that I want to run an executable from my program, passing it
parameters, and get the value the executable returns and proceed with my
program.  I'm working with Microsoft C 6.0, but I want it to be Unix/Xenix
portable.  Please send me mail if you have a solution.  Thanks in advance.

Jay Potter
ojpotter@fred.cs.washington.edu

ojpotter@fred.cs.washington.edu (07/07/90)

This is the last time I will post this, sorry about all the clutter.  I'm
just posting this because some of you said that if I had given more details
it would have been easier to solve my problem.  Well, here it goes.

I wrote a small executable that takes the IEEE-488 address of a Fluke
Digital voltmeter and an integer to specify the function I want to perform
(i.e. set AC volts, get a reading, etc.).  The main() is declared as a float
function because I want it to return the displayed AC volt reading when I
trigger it.  Unfortunately system() only returns an integer, and exec() makes
me overlay my program as well as only returning an integer.  Is there any 
way to get either of these to return the float that my executable produces?
Or can't you declare main() as a float?  I'm sorry about the confusion and
inconvienence.  Thanks again for all the helpful info.  If you have any more
please email it to me.  Thanks again.

Jay Potter
ojpotter@fred.cs.washington.edu

P.S.  This *has* to be DOS compatible Unix (unfortunately) is optional