Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

unlink(2) OSS System Calls Reference Manual
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
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
RETURN VALUES
Upon successful completion, the value 0 (zero) is returned. Otherwise, the value -1 is returned,
the named file is not changed, and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the function sets errno to the corresponding value and
the named file is not unlinked:
[EACCES] One of the following conditions is true:
Search permission is denied for a component of the pathname prefix, or
write permission is denied on the directory containing the link to be
removed.
The S_ISVTX flag is set on the directory containing the existing file
referred to by the path parameter. However, the calling process is not
any of the following:
The file owner
The directory owner
A process with appropriate privileges
[EBUSY] The named file is one of the following:
The /dev/tty file
The /dev/null file
[EFAULT] The path parameter is an invalid address.
[EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt.
[EGUARDIANOPEN]
One of the following conditions exists:
The named file is a Guardian file open in the Guardian environment.
The named file is a Guardian EDIT file (file code 101), and it is open in
the OSS environment.
[EINVAL] The named file is a structured file in /G (the Guardian file system). Such files
cannot be removed by the unlink( ) function.
[EIO] An input or output error occurred. The device holding the file might be in the
down state, or both processors that provide access to the device might have
failed.
98 Hewlett-Packard Company 527186-023