02.07.2013 Views

A/UX® Programmer's Reference

A/UX® Programmer's Reference

A/UX® Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

acct(2) acct(2)<br />

NAME<br />

acct - enable or disable process accounting<br />

SYNOPSIS<br />

int acct (path)<br />

char *pathi<br />

DESCRIPTION<br />

acct is used to enable or disable the system process accounting<br />

routine. If the routine is enabled, an accounting record will be<br />

written on an accounting file for each process that terminates.<br />

Tennination can be caused by one of two things: an exi t call or<br />

a signal; see exi t(2) and signal(3). The effective user ID of<br />

the calling process must be superuser to use this call.<br />

path points to a path name naming the accounting file. The accounting<br />

file format is given in acct(4).<br />

The accounting routine is enabled if path is nonzero and no errors<br />

occur during the system call. It is disabled if path is zero and no<br />

errors occur during the system call.<br />

RETURN VALUE<br />

Upon successful completion, a value of 0 is returned. Otherwise,<br />

a value of -1 is returned and errno is set to indicate the error.<br />

ERRORS<br />

acct will fail if one or more of the following are true:<br />

[EPERM]<br />

[EPERM]<br />

[ENAMETOOLONG]<br />

[ELOOP]<br />

[EBUSY]<br />

[ENOTDIR]<br />

[ENOENT]<br />

February, 1990<br />

Revision C<br />

A pathname contains a character with the<br />

high-order bit set.<br />

The effective user ID of the calling process<br />

is not superuser.<br />

A component of a pathname exceeded<br />

NAME MAX characters, or an entire pathname<br />

exceeded PATH MAX.<br />

Too many symbolic links were encountered<br />

in translating a pathname.<br />

An attempt is being made to enable accounting<br />

when it is already enabled.<br />

A component of the path prefix is not a<br />

directory.<br />

One or more components of the accounting<br />

file path name do not exist.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!