Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 360013 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/rc/runscript.c (-2 / +7 lines)
Lines 300-308 write_prefix(const char *buffer, size_t bytes, bool *prefixed) Link Here
300
	/* Spin until we lock the prefix */
300
	/* Spin until we lock the prefix */
301
	for (;;) {
301
	for (;;) {
302
		lock_fd = open(PREFIX_LOCK, O_WRONLY | O_CREAT, 0664);
302
		lock_fd = open(PREFIX_LOCK, O_WRONLY | O_CREAT, 0664);
303
		if (lock_fd != -1)
303
		if (lock_fd != -1) {
304
			if (flock(lock_fd, LOCK_EX) == 0)
304
			if (flock(lock_fd, LOCK_EX) == 0)
305
				break;
305
				break;
306
		}
307
		else {
308
			eerror("Error: open(%s) failed:: %s", PREFIX_LOCK, strerror(errno));
309
			eerror("Please make sure you have enough permissions");
310
			break;
311
		}
306
		close(lock_fd);
312
		close(lock_fd);
307
	}
313
	}
308
314
309
- 

Return to bug 360013