Child processes redefined
Archer Sully
archer at elysium.sgi.com
Wed Jul 11 07:47:49 AEST 1990
In article <1990Jul6.145122.14785 at usenet@kadsma> pajerek at usenet@kadsma (Don Pajerek) writes:
>In article <12473 at june.cs.washington.edu> ojpotter at fred.cs.washington.edu () writes:
>> I want to use these external
>>executables as runtime functions. I want to pass them parameters and get a
>>calculated return value back.
>>
>Am I missing something, or won't fork/exec do the job?
It may. Then again, it may not. If the dynamic function needs to access
data and text from the main program, then using a fork/exec scheme will
be either insufficient or inefficient, because the data would have to
be passed through some arcane means (encoding in strings for parameters,
shared memory, etc...). Return values suffer similar problems. If all
that is needed is an int return, then it shouldn't be too tough, but if
floating point or a structure of some sort is required, it gets more
difficult.
The C language does not define dynamic loading. That is a feature of the
operating system, and many do not have it.
Archer Sully | Ask not what you can do for you country,
(archer at esd.sgi.com) | But what your country's been doing to you.
| -- The Avengers
More information about the Comp.lang.c
mailing list