Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ site(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sfent, sfnum, sfname, sfctype, sfxcode, setsf, endsf



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



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026