Technical article 104867

uname(C) in OpenServer 5.0 does not behave the same as in SCO UNIX 3.2v4.x

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

When I type uname(C) on an SCO UNIX Release 3.2v4.x, the node name of the machine is returned. The same command on an SCO OpenServer Release 5.0 returns "SCO_SV" and not the machine node name.

Cause

The behavior of uname(C) in SCO UNIX Release 3.2v4.x did not comply with the ISO/IEC DIS 9945-2:1992 POSIX standard. The behavior of of uname(C) has been changed in OpenServer Release 5.0.0 to comply with this standard.

Solution

You can use the UNAME_OLD environment variable to force uname(C) to exhibit the obsolete behavior on a per process basis as follows.

For the sh(C) and ksh(C) use:
UNAME_OLD=1; export UNAME_OLD
For the csh(C) use:
setenv UNAME_OLD 1

See also

hostname(ADMN)

From the Xinuos technical article database, record 104867. Reproduced with permission. The original is at www.sco.com/ta/104867, 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.