ipc functions and Environment Vairables

E

Erik Wanta

Guest
Satya:
I recently opened an SR32514250/PCR606240 to provide an option to copy
the local environment variables to the remote host before execution.

To do this manually, I first tried:
;This doesn't give a full list as SKILL string limit = 8k
cid=ipcBeginProcess("printenv")
ipcWait(cid)
envvarlist=parseString(ipcReadProcess(cid) "\n")

Since I ran into the string limit, I did:
csh("printenv > /tmp/envvars")

if(inPort=infile("/tmp/envvars") then
envvarlist=nil

while(gets(line inPort)
envvarlist=append1(envvarlist line)
) ; while

close(inPort)
else
error("unable to open /tmp/envvars")
) ; if

foreach(envvar envvarlist
fprintf(outPort "setenv %s \"%s\"\n" car(parseString(envvar "="))
car(parseString(cadr(parseString(envvar "=")) "\n")))
) ; foreach

So, I submit a job with ipcBeginProcess or ipcBatchProcess and submit
to a remote host. The job I submit is a script that first sets all
the local environment variables and then runs an OCEAN script or
whatever.
---
Erik

From: Satya Mishra (snmishra@india.com)
Subject: ipc functions and Environment Vairables
Newsgroups: comp.cad.cadence
Date: 2003-02-05 09:13:02 PST


Hi All

I was trying to use ipc functions for running some external programs
from within cadence tools. Well, turns out ipc is really "sh -c" (at
least on the local machine, I haven't been able to make it work on
remote computers). So I can do a lot of things, specifically, set
environment variables with sh syntax. I don't know if this going to be
the situation for ever.

Does anybody have a better way of passing environment variables to ipc
child processes?

Regards
Satya
 

Welcome to EDABoard.com

Sponsor

Back
Top