icon Top 9 categories map      RocketAware > man pages >

ftok(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others



FTOK(3)                   OpenBSD Programmer's Manual                  FTOK(3)

NAME
     ftok - create IPC identifier from a pathname



SYNOPSIS
     #include <sys/types.h>
     #include <sys/ipc.h>

     key_t
     ftok(const char *path, int id);

DESCRIPTION
     The ftok() function attempts to create a unique key suitable for use with
     the msgget(2),  semget(2) and shmget(2) functions given the path of an
     existing file and a user-selectable id.

     The specified path must refer to an existing file that is accessible to
     the calling process or the call will fail.  Also, note that links to
     files will return the same key, given the same id. Only the 8 least sig-
     nificant bits of id are used in the key generation; the rest of the bits
     are ignored.

RETURN VALUES
     The ftok() function will return (key_t)-1 if path does not exist or if it
     cannot be accessed by the calling process.

SEE ALSO
     msgget(2),  semget(2),  shmget(2)

HISTORY
     The ftok() function originated with System V and is typically used by
     programs that use the System V IPC routines.

AUTHOR
     Thorsten Lockert <tholo@sigmasoft.com>

BUGS
     The returned key is computed based on the device and inode of the speci-
     fied path in combination with the given id. Thus it is quite possible for
     the routine to return duplicate keys given that those fields are not 8-
     and 16-bit quantities like they were on System V based systems where this
     library routine's ancestors were originally created.

OpenBSD 2.6                      June 24, 1994                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for ftok(3) functions
OpenBSD sources for ftok(3)


[Overview Topics]

Up to: Local Process Communication - Communication between processes running on the same system. Synchronization. File locking. Signals. FIFOs, pipes, et al


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Solaris Others






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > ftok.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments