Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acct(2) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(1M)

acct(4)

exit(2)

signal(2)



acct(2)                        DG/UX R4.11MU05                       acct(2)


NAME
       acct - enable or disable process accounting

SYNOPSIS
       #include <unistd.h>

       int  acct (path)
       char * path;

   where:
       path      Address of a pathname

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 calling process must have appropriate privilege to successfully
       execute this system call.  On a generic DG/UX system, appropriate
       privilege is granted by having an effective UID of 0 (root).  See the
       appropriateprivilege(5) man page for more information.

       On a system with DG/UX information security, appropriate privilege is
       granted by having one or more specific capabilities enabled in the
       effective capability set of the user.  See the capdefaults(5) man
       page for the default capabilities for this system call.

       To enable accounting the calling process must have write access to
       the accounting file.

RETURN VALUE
       0      The accounting file was successfully changed.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       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 or does
                      not allow write access.

       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.

       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
       acct(1M), acct(4), exit(2), signal(2), capdefaults(5).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026