From 69cd4c07665c96ce3e6779fa9be6394edaf14c18 Mon Sep 17 00:00:00 2001 From: DoctorNoobingstoneIPresume Date: Mon, 9 May 2022 09:08:50 +0300 Subject: [PATCH] lib/crash.cpp: `addr2line`: `fcntl` calls in `pipe` initializations fixed. --- lib/crash.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/crash.cpp b/lib/crash.cpp index a849b92ed8..75b5ef065c 100644 --- a/lib/crash.cpp +++ b/lib/crash.cpp @@ -112,10 +112,10 @@ MTONLY( #else if (pipe(pfd1) < 0) return 0; if (pipe(pfd2) < 0) return 0; - fcntl(pfd1[0], F_SETFD, FD_CLOEXEC | fcntl(pfd1[0], F_GETFL)); - fcntl(pfd1[1], F_SETFD, FD_CLOEXEC | fcntl(pfd1[1], F_GETFL)); - fcntl(pfd2[0], F_SETFD, FD_CLOEXEC | fcntl(pfd2[0], F_GETFL)); - fcntl(pfd2[1], F_SETFD, FD_CLOEXEC | fcntl(pfd2[1], F_GETFL)); + fcntl(pfd1[0], F_SETFD, FD_CLOEXEC | fcntl(pfd1[0], F_GETFD)); + fcntl(pfd1[1], F_SETFD, FD_CLOEXEC | fcntl(pfd1[1], F_GETFD)); + fcntl(pfd2[0], F_SETFD, FD_CLOEXEC | fcntl(pfd2[0], F_GETFD)); + fcntl(pfd2[1], F_SETFD, FD_CLOEXEC | fcntl(pfd2[1], F_GETFD)); #endif while ((child = fork()) == -1 && errno == EAGAIN) {} if (child == -1) return 0;