|
|
||
|
||
|
|
| Red Hat Documentation: man pages: man3: Linux Programmer's Manual (3) |
FTOKSection: Linux Programmer's Manual (3)Updated: November 1, 2025 Index NAMEftok - convert a pathname and a project identifier to a System V IPC keySYNOPSIS# include <sys/types.h> # include <sys/ipc.h> key_t ftok ( char *pathname, char proj ) DESCRIPTIONThe function converts the pathname of an existing accessible file and a project identifier into a key_t type System V IPC key.RETURN VALUEOn success the return value will be the converted key_t value, otherwise -1 with errno indicating the error as for the system call.BUGSThe generated key_t value is obtained stat-ing the disk file corresponding to pathname in order to get its i-node number and the minor device number of the filesystem on which the disk file resides, then by combining the 8 bit proj value along with the lower 16 bits of the i-node number, along with the 8 bits of the minor device number. The algorithm does not guarantee a unique key value. In fact
SEE ALSO
IndexThis document was created by using the manual pages. Time: 11:58:03 GMT, March 24, 2025 |
|
|