2.9BSD/usr/man/cat2/acct.2

Compare this file to the similar file:
Show the results in this format:


ACCT(2)             UNIX Programmer's Manual              ACCT(2)

NAME
     acct - turn accounting on or off

SYNOPSIS
     acct(file)
     char *file;

DESCRIPTION
     The system is prepared to write a record in an accounting
     _f_i_l_e for each process as it terminates.  This call, with a
     null-terminated string naming an existing file as argument,
     turns on accounting; records for each terminating process
     are appended to _f_i_l_e.  _F_i_l_e must already exist.  An argument
     of 0 causes accounting to be turned off.

     The accounting file format is given in _a_c_c_t(5).

     This call is permitted only to the super-user.

DIAGNOSTICS
     Upon successful completion, a value of 0 is returned.  Oth-
     erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
     cate the error.

ERRORS
     _A_c_c_t will fail if one of the following is true:

     [EPERM]             The caller is not the super-user.

     [EINVAL]            The path name contains a non-ASCII byte.

     [ENOTDIR]           A component of the path prefix is not a
                         directory.

     [ENOENT]            The named file does not exist.

     [EISDIR]            The named file is a directory.

     [EROFS]             The named file resides on a read-only
                         file system.

     [EFAULT]            _F_i_l_e points outside the process's allo-
                         cated address space.

     [ELOOP]             Too many symbolic links were encountered
                         in translating the path name.

     [EACCES]            _F_i_l_e is not a regular file.

     [EBUSY]             An attempt is made to turn on accounting
                         when it is already on.

Printed 7/30/83                                                 1

ACCT(2)             UNIX Programmer's Manual              ACCT(2)

BUGS
     No accounting is produced for programs running when a crash
     occurs.  In particular nonterminating programs are never
     accounted for.

SEE ALSO
     acct(5), sa(8)

ASSEMBLER
     (acct = 51.)
     sys acct; file

Printed 7/30/83                                                 2