acct(2)
_________________________________________________________________
acct System Call
Enable or disable process accounting.
_________________________________________________________________
SYNTAX
None.
int acct (path)
char * path;
PARAMETERS
path Address of a path name.
DESCRIPTION
This function provides capabilities that are inherently
implementation dependent.
Acct enables or disables process accounting. If process
accounting is enabled, an accounting record will be written on an
accounting file for each process that terminates.
<Path> points to the path name of the accounting file. The
accounting file format and the information it contains are
implementation dependent.
Process accounting is disabled if <path> is NULL and enabled if
<path> is non-NULL.
If errors occur during the acct operation, the status of process
accounting is not changed. If errors occur when an accounting
record is written, the record may be lost.
ACCESS CONTROL
The effective-user-id of the calling process must be super-user.
RETURN VALUE
0 The accounting file was successfully changed.
-1 An error occurred. Errno is set to indicate the
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
acct(2)
error.
EXCEPTIONS
Errno may be set to one of the following error codes:
EPERM Permission to enable or disable process accounting
is denied to the calling process.
EACCES The file named by <path> is not an ordinary file.
EISDIR The named file is a directory.
EROFS The named file resides on a read-only file system.
ENOENT The file the pathname resolved to does not exist.
ENOENT A non-terminal component of the pathname does not
exist.
ENOTDIR A non-terminal component of the pathname was not a
directory or symbolic link.
ENAMETOOLONG The pathname exceeds the length limit for
pathnames.
ENAMETOOLONG A component of the pathname exceeds the length
limit for filenames.
ENOMEM There are not enough system resources to resolve
the pathname or to expand a symbolic link.
ELOOP The number of symbolic links encountered during
pathname resolution exceeded MAXSYMLINKS. A
symbolic link cycle is suspected.
EPERM The pathname contains a character not in the
allowed character set.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)
acct(2)
EFAULT The pathname does not completely reside in the
process's address space or the pathname does not
terminate in the process's address space.
SEE ALSO
The related system calls: exit, signal.
The related manual section: acct(4).
DG/UX 4.00 Page 3
Licensed material--property of copyright holder(s)