summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/SyscallUtils.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-22 21:19:10 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-22 21:19:10 +0200
commit32dfde746abc62d2216e5e5e2d0df08e33c02ff0 (patch)
tree1b2a609ef4d4d2ba79ea19e3b56992106e52b8cd /Libraries/LibCore/SyscallUtils.h
parent79d3c5723f421a11dbc025019a671bc87b002d9d (diff)
downloadserenity-32dfde746abc62d2216e5e5e2d0df08e33c02ff0.zip
LibCore: Put safe_syscall() debug spam behind #ifdef
Diffstat (limited to 'Libraries/LibCore/SyscallUtils.h')
-rw-r--r--Libraries/LibCore/SyscallUtils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibCore/SyscallUtils.h b/Libraries/LibCore/SyscallUtils.h
index 59b7d76b08..1c24efd9c2 100644
--- a/Libraries/LibCore/SyscallUtils.h
+++ b/Libraries/LibCore/SyscallUtils.h
@@ -41,8 +41,10 @@ inline int safe_syscall(Syscall syscall, Args&&... args)
for (;;) {
int sysret = syscall(forward<Args>(args)...);
if (sysret == -1) {
+#ifdef SAFE_SYSCALL_DEBUG
int saved_errno = errno;
dbg() << "Core::safe_syscall: " << sysret << " (" << saved_errno << ": " << strerror(saved_errno) << ")";
+#endif
if (errno == EINTR)
continue;
ASSERT_NOT_REACHED();