From owner-svn-src-all@FreeBSD.ORG Fri Jan 28 21:51:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031C6106566B; Fri, 28 Jan 2011 21:51:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E73C68FC0A; Fri, 28 Jan 2011 21:51:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0SLpe5Y001333; Fri, 28 Jan 2011 21:51:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0SLpeSG001331; Fri, 28 Jan 2011 21:51:40 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201101282151.p0SLpeSG001331@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 28 Jan 2011 21:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218042 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 21:51:41 -0000 Author: pjd Date: Fri Jan 28 21:51:40 2011 New Revision: 218042 URL: http://svn.freebsd.org/changeset/base/218042 Log: Add comments to places where we treat errors as ciritical, but it is possible to handle them more gracefully. MFC after: 1 week Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Fri Jan 28 21:48:15 2011 (r218041) +++ head/sbin/hastd/primary.c Fri Jan 28 21:51:40 2011 (r218042) @@ -796,6 +796,7 @@ hastd_primary(struct hast_resource *res) * Create communication channel between parent and child. */ if (proto_client("socketpair://", &res->hr_ctrl) < 0) { + /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to create control sockets between parent and child"); @@ -804,6 +805,7 @@ hastd_primary(struct hast_resource *res) * Create communication channel between child and parent. */ if (proto_client("socketpair://", &res->hr_event) < 0) { + /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to create event sockets between child and parent"); @@ -811,6 +813,7 @@ hastd_primary(struct hast_resource *res) pid = fork(); if (pid < 0) { + /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_TEMPFAIL, "Unable to fork"); }