ACC Programmer's Reference Guide

246 Chapter4
ZCOM C I/F Library Routines
ZNAME (3X)
PARAMETERS
RETURN VALUE Routine zname returns 0 if successful. Otherwise, a non-zero error code
is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM
error codes and their meanings.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
char name[8];
zsinfo_type sip;
/* zinit() must be called in your program before zname() can be called. */
if (ierr = zinit(&sip)) {
/* error return code */
return(ierr);
}
zaddr.node = 0; /* The local node. */
if (ierr = zname (&zaddr, name)) {
/* error return code */
}
else {
/* good return code */
}
async-signal unsafe It cannot be called from a signal handler.
fork unsafe It cannot be called by a child process after fork(2) but
before exec(2).
zap (Return param) ZCOM address.
name ZLU symbolic name to search for. The name may be a
maximum of 7 characters long, and must be
left-justified and null-terminated. Comparison is case
sensitive.