summaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index e504e4a..0eea335 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -311,8 +311,12 @@ write_prefix(const char *buffer, size_t bytes, bool *prefixed)
lock_fd = open(PREFIX_LOCK, O_WRONLY | O_CREAT, 0664);
if (lock_fd != -1) {
- if (flock(lock_fd, LOCK_EX) != 0)
- eerror("flock() failed: %s", strerror(errno));
+ while (flock(lock_fd, LOCK_EX) != 0) {
+ if (errno != EINTR) {
+ eerror("flock() failed: %s", strerror(errno));
+ break;
+ }
+ }
}
#ifdef RC_DEBUG
else