PTC MKS Toolkit Knowledge Base

Section:IO
Product:MKS Toolkit (TKPDev/TKEDev)
Version:
OS:All
Keywords:deploy, system(), popen()
Category:Deployment/Knowledge Base


Why do system()/popen() in the NuTCRACKER Workstation behave differently than in the development environment?


Both functions rely on a shell or command processor. system() / popen() first looks for a shell in the $SHELL environment variable. If this is not defined, it uses the Windows command interpreter specified by $COMSPEC. The differences you are seeing are probably caused by one of two things:

  • $SHELL is probably not set for the NuTCRACKER Workstation. It is set by default to the MKS KornShell, but only in the development environment. You are probably using the Windows command processor.

  • If $SHELL is set for the NuTCRACKER Workstation, it is probably set to a non-existent shell. The MKS KornShell is not part of the base NuTCRACKER Workstation runtime but is included with both the Power User Utilities and Developer Utilities components.