SITE(2,L) AIX Technical Reference SITE(2,L)
-------------------------------------------------------------------------------
site
PURPOSE
Returns the site number on which the specified process is running.
SYNTAX
#include <sys/types.h>
siteno_t site(pid)
pid_t pid;
DESCRIPTION
The site system call returns the site number of the specified process. If pid
is 0, the current process is assumed. If the specified process cannot be
located, -1 is returned.
RETURN VALUE
Upon successful completion, a nonnegative value for siteno_t is returned
indicating the site number. Otherwise, a -1 is returned and errno is set to
indicate the error.
ERROR CONDITIONS
The site system call fails if the following is true:
ESRCH The process ID specified is invalid.
EXAMPLES
#include <sys/types.h>
/* This program prints the number of the site where it is executed */
main()
{
printf(''mysite is %d\n'', site((pid_t) 0));
}
RELATED INFORMATION
In this book: "sfent, sfnum, sfname, sfctype, sfxcode, setsf, endsf."
Processed November 7, 1990 SITE(2,L) 1