Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 279781 Details for
Bug 360013
sys-apps/openrc-0.8.0 loops forever when init.d is called as non-root user and rc_parallel=yes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-Leave-the-lock-loop-in-case-of-errors.patch
0001-Leave-the-lock-loop-in-case-of-errors.patch (text/plain), 1.17 KB, created by
Christian Ruppert (idl0r)
on 2011-07-11 15:46:54 UTC
(
hide
)
Description:
0001-Leave-the-lock-loop-in-case-of-errors.patch
Filename:
MIME Type:
Creator:
Christian Ruppert (idl0r)
Created:
2011-07-11 15:46:54 UTC
Size:
1.17 KB
patch
obsolete
>From 5d3ae35331e3c19343b30d5916d886727ddc2d29 Mon Sep 17 00:00:00 2001 >From: Christian Ruppert <idl0r@gentoo.org> >Date: Mon, 11 Jul 2011 17:39:31 +0200 >Subject: [PATCH] Leave the lock loop in case of errors > >OpenRC uses locking in parallel mode and it waits until it can lock. There was >no error checking before so it never left the loop in case of errors. >This patch will leave the loop as soon as open() fails. > >X-Gentoo-Bug: 360013 >X-Gentoo-Bug-URL: https://bugs.gentoo.org/360013 >--- > src/rc/runscript.c | 8 +++++++- > 1 files changed, 7 insertions(+), 1 deletions(-) > >diff --git a/src/rc/runscript.c b/src/rc/runscript.c >index f62e8dc..637b1a9 100644 >--- a/src/rc/runscript.c >+++ b/src/rc/runscript.c >@@ -300,9 +300,15 @@ write_prefix(const char *buffer, size_t bytes, bool *prefixed) > /* Spin until we lock the prefix */ > for (;;) { > lock_fd = open(PREFIX_LOCK, O_WRONLY | O_CREAT, 0664); >- if (lock_fd != -1) >+ if (lock_fd != -1) { > if (flock(lock_fd, LOCK_EX) == 0) > break; >+ } >+ else { >+ eerror("Error: open(%s) failed:: %s", PREFIX_LOCK, strerror(errno)); >+ eerror("Please make sure you have enough permissions"); >+ break; >+ } > close(lock_fd); > } > >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 360013
:
266981
|
269017
|
269019
|
269049
|
270575
|
270633
| 279781