Operating System - HP-UX
1820261 Members
3051 Online
109622 Solutions
New Discussion

systemcall uname return with errno 72

 
mingfuz
New Member

systemcall uname return with errno 72

Hi,

For some reason the hostname must change, and it from "jftest1" to "TEST-BILLING-APP-002".
After the chages, my c++ application use systemcall 'uname()' returns errno 72.
It seems the hostname is too long(I found the limit of hostname is 8 characters).

What happened when change the hostname
Here are some informations about the host:
OS info:
Nodename: TEST-BILLING-APP-002
Release: HP-UX B.11.31
Version: U (unlimited-user license)
Machine: ia64

My question:
the function uname() return the struct value:
struct utsname {
char sysname[9];
char nodename[9];
char release[9];
char version[9];
char machine[9];
char __idnumber[15];
};
Which file(s) the values come from?
/etc/hosts or /etc/rc.config.d/netconf?
and what is the relationship of the fields?
1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: systemcall uname return with errno 72

See this recent thread:
http://h30499.www3.hp.com/t5/Languages-and-Scripting/HP-UX-11-23-uname-issue-with-c-programm/m-p/4742994#M29490


HOSTNAME comes from /etc/rc.config.d/netconf. This is used if NODENAME isn't set.

By default, HOSTNAME has a limit of 64 and NODENAME of 8.