Passing data between filepro tasks

Kenneth Brody kenbrody at spamcop.net
Fri Jun 17 14:29:27 PDT 2011


On 6/17/2011 2:04 PM, Jay Ashworth wrote:
> ----- Original Message -----
>> From: "Del"<del at altsystem.com>
>
>> In the Windows environment (which I seldom work in), I am writing a
>> filepro program that executes other existing pgms using the ‘system
>> “dclerk etc, etc”’ command. This works great, and I can pass values
>> from the “mother” task to the “daughter” tasks using the flags –rw,
>> –rx, –ry. My question is, what is the best way to pass values back
>> from the “daughter” to the “mother”? I can think of a couple of clumsy
>> ways, don’t know of a really nifty one. Don’t really want to create a
>> file to do this, but will if I have to.
>
> You *may* be able to use SETENV and GETENV for this: in Windows, processes
> all live in the same process space, unlike Unix, where the parent can't see
> changes made in child processes... but you'd have to test this, as I never
> have.  Your code is *guaranteed* not to be portable to Unix if you do this,
> though, so keep that in mind.

You haven't been able to make changes to the parent's environment since 
real-mode MS-DOS days.  (And even then, only by some undocumented, 
version-specific hacks.)

And, AFAIK, Windows processes haven't shared memory space since 16-bit days.

I can guarantee that PUTENV would never have affected the parent process' 
environment, as even under real-mode MS-DOS, each process got a copy of the 
parent's environment.

The only thing that can be passed back to the parent through something other 
than things like an external file or IPC, is an exit value.

-- 
Kenneth Brody


More information about the Filepro-list mailing list