github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/contrib/syscall-test/acct.c (about) 1 #define _GNU_SOURCE 2 #include <unistd.h> 3 #include <stdlib.h> 4 #include <stdio.h> 5 #include <string.h> 6 #include <errno.h> 7 8 int main(int argc, char **argv) 9 { 10 int err = acct("/tmp/t"); 11 if (err == -1) { 12 fprintf(stderr, "acct failed: %s\n", strerror(errno)); 13 exit(EXIT_FAILURE); 14 } 15 exit(EXIT_SUCCESS); 16 }