[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/seccomp-no-gnulib-2 7c304bc 4/4: * src/emacs.c (load_seccomp): R
From: |
Philipp Stephani |
Subject: |
scratch/seccomp-no-gnulib-2 7c304bc 4/4: * src/emacs.c (load_seccomp): Retry on interrupts. |
Date: |
Mon, 5 Apr 2021 12:56:57 -0400 (EDT) |
branch: scratch/seccomp-no-gnulib-2
commit 7c304bc53b1348e2ee5a91b82e3fa6e1fa03d78b
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>
* src/emacs.c (load_seccomp): Retry on interrupts.
---
src/emacs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/emacs.c b/src/emacs.c
index bb2a0bb..b7dd52b 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -976,7 +976,10 @@ load_seccomp (const char *file)
{
bool success = false;
struct sock_fprog program = {0, NULL};
- FILE *stream = fopen (file, "rb");
+ FILE *stream;
+ do
+ stream = fopen (file, "rb");
+ while (stream == NULL && errno == EINTR);
if (stream == NULL)
{
emacs_perror ("fopen");