• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. csh() command - pls help

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 2799
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

csh() command - pls help

Peter123
Peter123 over 14 years ago

 Hi,

Anyone can explain why the setenv command in csh is not working?

 

i got this in my ciw :

csh("setenv JJ \"harlo\"")

 t

When it returned a "t", meant the csh command is executed sucessfully.

 when i did a echo $JJ in my work dir...

I got this :

JJ: Undefined variable

 

Any one can explain why...

 

Thanks,

-p-

 

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    Because that is not how UNIX works.

    When you launch virtuoso/icfb it is a child process of the shell you started it in. It inherits the environment (eg env vars) from the parent shell. Any env var you change in virtuoso (eg using the SKILL function setShellEnvVar()) will not affect the parent process, but will affect any child processes launched by virtuoso.

    When you launch csh("setenv ...") you are in fact starting yet another process (a grandchild of the shell you started) so that's even further way from affecting the parent.

    Even if you were in the terminal window and did "csh -c 'setenv JJ harlo'" it would not affect what you see in the terminal, because that too is a child process. (Note that csh command line I did not test, but I think the -c syntax is correct)

    Fundamentally child processes cannot affect the environment of their parent.

    Regards,

    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 14 years ago
    Because that is not how UNIX works.

    When you launch virtuoso/icfb it is a child process of the shell you started it in. It inherits the environment (eg env vars) from the parent shell. Any env var you change in virtuoso (eg using the SKILL function setShellEnvVar()) will not affect the parent process, but will affect any child processes launched by virtuoso.

    When you launch csh("setenv ...") you are in fact starting yet another process (a grandchild of the shell you started) so that's even further way from affecting the parent.

    Even if you were in the terminal window and did "csh -c 'setenv JJ harlo'" it would not affect what you see in the terminal, because that too is a child process. (Note that csh command line I did not test, but I think the -c syntax is correct)

    Fundamentally child processes cannot affect the environment of their parent.

    Regards,

    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information