|
|
HP-UX Reference > Fftok(3C)HP-UX 11i Version 2: December 2007 Update |
|
NAMEftok() — create interprocess communication identifier DESCRIPTIONAll interprocess communication facilities require the user to supply a key to be used by the msgget(), semget(), and shmget() system calls to obtain interprocess communication identifiers (see msgget(2), semget(2), and shmget(2)). ftok() returns a key based on path and id that is usable in subsequent msgget(), semget(), and shmget() system calls. The parameters for the ftok() function are as follows:
RETURN VALUEftok() returns (key_t)-1 if path does not exist or if it is not accessible to the process. EXAMPLESThe following call to ftok() returns a key associated with the file myfile and id A: key_t mykey; mykey = ftok ("myfile", 'A'); |
|