ACCT(S) XENIX System V ACCT(S)
Name
acct - Enables or disables process accounting.
Syntax
#include <sys/types.h>
int acct (path)
char *path;
Description
acct is used to enable or disable the system's process
accounting routine. If the routine is enabled, an
accounting record will be written on an accounting file for
each process that terminates. A process can be terminated
by a call to exit or by receipt of a signal which it does
not ignore or catch; see exit(S) and signal(S). The
effective user ID of the calling process must be super-user
to use this call.
path points to the pathname of the accounting file. The
accounting file format is given in acct(F).
The accounting routine is enabled if path is nonzero and no
errors occur during the system call. It is disabled if path
is zero and no errors occur during the system call.
acct will fail if one or more of the following are true:
The effective user ID of the calling process is not
super-user. [EPERM]
An attempt is being made to enable accounting when it
is already enabled. [EBUSY]
A component of the path prefix is not a directory.
[ENOTDIR]
One or more components of the accounting file's
pathname do not exist. [ENOENT]
A component of the path prefix denies search
permission. [EACCES]
The file named by path is not an ordinary file.
[EACCES]
mode permission is denied for the named accounting
file. [EACCES]
The named file is a directory. [EACCES]
The named file resides on a read-only file system.
Page 1 (printed 8/7/87)
ACCT(S) XENIX System V ACCT(S)
[EROFS]
path points to an illegal address. [EFAULT]
Return Value
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno is set to
indicate the error.
See Also
accton(C), acctcom(C), acct(F)
Page 2 (printed 8/7/87)