Module Name:    src
Committed By:   pooka
Date:           Fri Oct  9 16:35:18 UTC 2009

Modified Files:
        src/libexec/lfs_cleanerd: lfs_cleanerd.c

Log Message:
Attempt to recover slightly more gracefully if the kernel socket is shutdown.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/libexec/lfs_cleanerd/lfs_cleanerd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/lfs_cleanerd/lfs_cleanerd.c
diff -u src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.21 src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.22
--- src/libexec/lfs_cleanerd/lfs_cleanerd.c:1.21	Thu Aug  6 00:51:55 2009
+++ src/libexec/lfs_cleanerd/lfs_cleanerd.c	Fri Oct  9 16:35:17 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.21 2009/08/06 00:51:55 pooka Exp $	 */
+/* $NetBSD: lfs_cleanerd.c,v 1.22 2009/10/09 16:35:17 pooka Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -1549,9 +1549,17 @@
 		} while(cleaned_one);
 		tv.tv_sec = segwait_timeout;
 		tv.tv_usec = 0;
+		/* XXX: why couldn't others work if fsp socket is shutdown? */
 		error = kops.ko_fcntl(fsp[0]->clfs_ifilefd,LFCNSEGWAITALL,&tv);
-		if (error)
-			err(1, "LFCNSEGWAITALL");
+		if (error) {
+			if (errno == ESHUTDOWN) {
+				for (i = 0; i < nfss; i++) {
+					handle_error(fsp, i);
+					assert(nfss == 0);
+				}
+			} else
+				err(1, "LFCNSEGWAITALL");
+		}
 	}
 
 	/* NOTREACHED */

Reply via email to