Library /sys$common/syshlp/helplib.hlb  —  CRTL  ftok  Description
    The ftok function returns a key, based on the path_name and
    project_id parameters, that is usable in subsequent calls to the
    semget function. The ftok function returns the same key for all
    paths that name the same file, when called with the same project_
    id parameter. Different keys are returned for the same file if
    different project_id parameters are used, or if paths are used
    that name different files existing on the same file system at the
    same time. If a file named by path_name is removed and recreated
    with the same name, the ftok function may return a different key
    than the original one.

    Only the low order 8 bits of project_id are significant. The
    behavior of ftok is unspecified if these bits are 0.

    For maximum portability, project_id must be a single-byte
    character.

    Upon successful completion, the ftok function returns a key.
    Otherwise, it returns the value (key_t)-1 and sets errno to
    indicate the error.
Close Help