Technical article 104934

csh(C) hangs and consumes CPU time and memory when I source a file.

OpenServer 5.0.0

Written · Last revised

Problem

I am sourcing a set of csh(C) commands and find that the
csh(C) reports that there is an undefined variable but I am
never returned to the shell prompt. The shell is still running
and consuming CPU and memory resource on the system.

Create a file called "foo" with the content:

unset $FRED; echo $FRED
Then issue the command:
source foo

This will result in the error message:

FRED: Undefined variable.

but you are never returned to the csh(C) prompt.

You will have to use kill(C) -1 to terminate the shell.

Cause

If you have any undefined variables among the csh(C) commands that you are sourcing, then the csh(C) will go into an uninterruptable state where it will consume CPU and memory resources.

Solution

SCO Engineering is aware of this problem and is working to
resolve it.  It is scheduled to be addressed in a future
release of SCO OpenServer.
As an alternative, use tcsh.  This shell is available
via ftp(TC) from:
https://ftp.scoexpert.com/Skunk/CD-ROM/bin/tcsh

From the Xinuos technical article database, record 104934. Reproduced with permission. The original is at www.sco.com/ta/104934, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.