Lines Matching refs:rc
40 int rc = cap_rights_limit(cap_fd, &r_rws); in main() local
42 …if (rc < 0) fprintf(stderr, "*** cap_rights_limit() failed: errno=%d %s\n", errno, strerror(errno)… in main()
47 rc = cap_rights_get(cap_fd, &rights); in main()
50 …fprintf(stderr, "[%d] cap_rights_get(cap_fd=%d) rc=%d rights=%s\n", getpid_(), cap_fd, rc, buffer); in main()
51 if (rc < 0) fprintf(stderr, "*** cap_rights_get() failed: errno=%d %s\n", errno, strerror(errno)); in main()
55 rc = fstat(cap_fd, &buf); in main()
56 fprintf(stderr, "[%d] fstat(cap_fd=%d) rc=%d errno=%d\n", getpid_(), cap_fd, rc, errno); in main()
57 if (rc != -1) fprintf(stderr, "*** fstat() unexpectedly succeeded\n"); in main()
61 rc = pdfork(&pd, 0); in main()
62 if (rc < 0) fprintf(stderr, "*** pdfork() failed: errno=%d %s\n", errno, strerror(errno)); in main()
64 if (rc == 0) { /* child */ in main()
73 fprintf(stderr, "[%d] pdfork() rc=%d pd=%d\n", getpid_(), rc, pd); in main()
76 pid_t actual_pid = rc; in main()
78 rc = pdgetpid(pd, &got_pid); in main()
79 …if (rc < 0) fprintf(stderr, "*** pdgetpid(pd=%d) failed: errno=%d %s\n", pd, errno, strerror(errno… in main()
85 rc = pdkill(pd, SIGKILL); in main()
86 fprintf(stderr, "[%d] pdkill(pd=%d, SIGKILL) -> rc=%d\n", getpid_(), pd, rc); in main()
87 if (rc < 0) fprintf(stderr, "*** pdkill() failed: errno=%d %s\n", errno, strerror(errno)); in main()
93 rc = wait4(-1, &status, WNOHANG, NULL); in main()
94 if (rc > 0) fprintf(stderr, "*** wait4(-1, ...) unexpectedly found child %d\n", rc); in main()
101 rc = cap_getmode(&cap_mode); in main()
102 fprintf(stderr, " [%d] cap_getmode() -> rc=%d, cap_mode=%d\n", getpid_(), rc, cap_mode); in main()
103 if (rc < 0) fprintf(stderr, "*** cap_getmode() failed: errno=%d %s\n", errno, strerror(errno)); in main()
105 rc = cap_enter(); in main()
106 fprintf(stderr, " [%d] cap_enter() -> rc=%d\n", getpid_(), rc); in main()
107 if (rc < 0) fprintf(stderr, "*** cap_enter() failed: errno=%d %s\n", errno, strerror(errno)); in main()
109 rc = cap_getmode(&cap_mode); in main()
110 fprintf(stderr, " [%d] cap_getmode() -> rc=%d, cap_mode=%d\n", getpid_(), rc, cap_mode); in main()
111 if (rc < 0) fprintf(stderr, "*** cap_getmode() failed: errno=%d %s\n", errno, strerror(errno)); in main()
114 rc = open("/etc/passwd", O_RDONLY); in main()
115 fprintf(stderr, " [%d] open('/etc/passwd') -> rc=%d, errno=%d\n", getpid_(), rc, errno); in main()
116 if (rc != -1) fprintf(stderr, "*** open() unexpectedly succeeded\n"); in main()
122 rc = wait4(child, &status, 0, NULL); in main()
130 rc = fexecve(ls_bin, argv_pass, null_envp); in main()
132 …fprintf(stderr, "*** fexecve(fd=%d) failed: rc=%d errno=%d %s\n", ls_bin, rc, errno, strerror(errn… in main()