ipc functions and Environment Vairables

Discussion in 'Cadence' started by Erik Wanta, Aug 1, 2003.

  1. Erik Wanta

    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 ()
    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
     
    Erik Wanta, Aug 1, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.