Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)
Guardian Native C Library Calls (f) ftok(3)
• The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
• The use of static memory by the process increases slightly.
These effects occur only when the first of the set of functions is called. The effects are not cumu-
lative.
NOTES
The id parameter should be a single-byte character to ensure portability.
CAUTIONS
It is important for each installation to define standards for forming keys. If no standard is
adhered to, unrelated processes can interfere with each other’s operation.
RETURN VALUES
Upon successful completion, the ftok() function returns a key that can be passed to the
msgget(), semget(),orshmget() function. Otherwise, the value -1 (cast as data type key_t)is
returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the ftok() function sets errno to the corresponding
value:
[EACCES] The calling process does not have search permission for a component of the
specified pathname.
[EFAULT] The path_name parameter points to a location outside of the allocated address
space of the process.
[EFSBAD] The program attempted an operation involving a fileset with a corrupted fileset
catalog.
[ELOOP] Too many symbolic links were traversed while trying to resolve the specified
pathname.
[ENAMETOOLONG]
One of the following is too long:
• The length of the pathname pointed to by the path_name parameter
• A component of the pathname pointed to by the path_name parameter
• The intermediate result of pathname resolution when a symbolic link is
part of the path_name parameter
The pathconf( ) function can be called to obtain the applicable limits.
[ENOENT] One of the following conditions exists:
• The file identified by the path_name parameter does not exist.
• The path_name parameter points to an empty string.
[ENOROOT] One of the following conditions exists:
• The root fileset of the local node (fileset 0) is not in the STARTED state.
• The current root fileset for the specified file is unavailable. The OSS
name server for the fileset might have failed.
527192-005 Hewlett-Packard Company 2−81