svn commit: r261692 - head/sbin/casperd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Feb 9 21:42:02 UTC 2014
Author: pjd
Date: Sun Feb 9 21:42:01 2014
New Revision: 261692
URL: http://svnweb.freebsd.org/changeset/base/261692
Log:
If the main casperd process exits, zygote process should exit as well
instead of spinning.
Reported by: Mikhail <mp at lenta.ru>
Modified:
head/sbin/casperd/zygote.c
Modified: head/sbin/casperd/zygote.c
==============================================================================
--- head/sbin/casperd/zygote.c Sun Feb 9 21:27:32 2014 (r261691)
+++ head/sbin/casperd/zygote.c Sun Feb 9 21:42:01 2014 (r261692)
@@ -132,8 +132,13 @@ zygote_main(int sock)
for (;;) {
nvlin = nvlist_recv(sock);
- if (nvlin == NULL)
+ if (nvlin == NULL) {
+ if (errno == ENOTCONN) {
+ /* Casperd exited. */
+ exit(0);
+ }
continue;
+ }
func = (zygote_func_t *)(uintptr_t)nvlist_get_number(nvlin,
"func");
flags = (int)nvlist_get_number(nvlin, "flags");
More information about the svn-src-all
mailing list