dgaudet 97/12/23 12:33:44
Modified: . STATUS
src CHANGES
src/main http_main.c
Log:
tell users to try the LockFile directive when a fcntl() locking error occurs.
Reviewed by: Jim Jagielski, Ken Coar
Revision Changes Path
1.20 +1 -4 apachen/STATUS
Index: STATUS
===================================================================
RCS file: /export/home/cvs/apachen/STATUS,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- STATUS 1997/12/23 19:55:54 1.19
+++ STATUS 1997/12/23 20:33:38 1.20
@@ -50,12 +50,9 @@
* Martin's [PATCH] Gimme a break! (missing break;s in mod_include)
* Dean's [PATCH] two bugs in mod_autoindex
* Igor Tatarinov's Re: A tiny correction and a question on writev_it_all
+ * Dean's [PATCH] more useful warning message for fcntl() lock failure
Available:
-
- * Dean's [PATCH] more useful warning message for fcntl() lock failure
- <[EMAIL PROTECTED]>
- Status: Dean +1, Jim +1, Ken +1
* Dean's [PATCH] ap_snprintf should be more sane (fwd)
<[EMAIL PROTECTED]>
1.538 +3 -0 apachen/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apachen/src/CHANGES,v
retrieving revision 1.537
retrieving revision 1.538
diff -u -r1.537 -r1.538
--- CHANGES 1997/12/23 02:03:52 1.537
+++ CHANGES 1997/12/23 20:33:40 1.538
@@ -1,4 +1,7 @@
Changes with Apache 1.3b4
+
+ *) When an error occurs in fcntl() locking suggest the user look up
+ the docs for LockFile. [Dean Gaudet]
*) Eliminate some dead code from writev_it_all().
[Igor Tatarinov <[EMAIL PROTECTED]>]
1.259 +15 -5 apachen/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -r1.258 -r1.259
--- http_main.c 1997/12/21 01:54:39 1.258
+++ http_main.c 1997/12/23 20:33:42 1.259
@@ -592,21 +592,31 @@
{
int ret;
- while ((ret = fcntl(lock_fd, F_SETLKW, &lock_it)) < 0 && errno == EINTR)
- continue;
+ while ((ret = fcntl(lock_fd, F_SETLKW, &lock_it)) < 0 && errno == EINTR)
{
+ /* nop */
+ }
if (ret < 0) {
aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
- "fcntl: F_SETLKW: Error getting accept lock. Exiting!");
+ "fcntl: F_SETLKW: Error getting accept lock, exiting! "
+ "Perhaps you need to use the LockFile directive to place "
+ "your lock file on a local disk!");
exit(1);
}
}
static void accept_mutex_off(void)
{
- if (fcntl(lock_fd, F_SETLKW, &unlock_it) < 0) {
+ int ret;
+
+ while ((ret = fcntl(lock_fd, F_SETLKW, &unlock_it)) < 0 && errno ==
EINTR) {
+ /* nop */
+ }
+ if (ret < 0) {
aplog_error(APLOG_MARK, APLOG_EMERG, server_conf,
- "fcntl: F_SETLKW: Error freeing accept lock. Exiting!");
+ "fcntl: F_SETLKW: Error freeing accept lock, exiting! "
+ "Perhaps you need to use the LockFile directive to place "
+ "your lock file on a local disk!");
exit(1);
}
}