#include <dirent.h> int acct(const char *filename); |
When called with the name of an existing file as argument, accounting is turned on and records for each terminating process are appended to filename as it terminates. An argument of NULL causes accounting to be turned off.
BSD process accounting has not been enabled when the operating system kernel was compiled. The kernel configuration parameter controlling this feature is CONFIG_BSD_PROCESS_ACCT.
Out of memory.
The calling process has no permission to enable process accounting.
The argument filename is not a regular file.
Error writing to the file filename.
There are no more free file structures or we run out of memory.