Lines Matching defs:error_fd
38 static void write_string(int error_fd, const char *str) {
39 int r = write(error_fd, str, strlen(str));
43 [[noreturn]] static void ExitWithError(int error_fd, const char *operation) {
45 write_string(error_fd, operation);
46 write_string(error_fd, " failed: ");
48 write_string(error_fd, strerror(err));
52 static void DisableASLR(int error_fd) {
57 ExitWithError(error_fd, "personality get");
61 ExitWithError(error_fd, "personality set");
65 static void DupDescriptor(int error_fd, const char *file, int fd, int flags) {
69 ExitWithError(error_fd, "DupDescriptor-open");
75 ExitWithError(error_fd, "DupDescriptor-dup2");
111 [[noreturn]] static void ChildFunc(int error_fd, const ForkLaunchInfo &info) {
114 ExitWithError(error_fd, "setpgid");
121 ExitWithError(error_fd, "close");
125 ExitWithError(error_fd, "dup2");
128 DupDescriptor(error_fd, action.path.c_str(), action.fd, action.arg);
137 ExitWithError(error_fd, "chdir");
140 DisableASLR(error_fd);
147 ExitWithError(error_fd, "pthread_sigmask");
152 ExitWithError(error_fd, "setgid");
174 if (fd > 2 && !info.has_action(fd) && fd != error_fd)
183 if (!info.has_action(fd) && fd != error_fd)
193 ExitWithError(error_fd, "ptrace");
216 ExitWithError(error_fd, "execve");