Add comments to places where we treat errors as ciritical, but it is possible
to handle them more gracefully. MFC after: 1 week
This commit is contained in:
parent
c3c56f8e41
commit
d64c0992e4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218042
@ -796,6 +796,7 @@ hastd_primary(struct hast_resource *res)
|
|||||||
* Create communication channel between parent and child.
|
* Create communication channel between parent and child.
|
||||||
*/
|
*/
|
||||||
if (proto_client("socketpair://", &res->hr_ctrl) < 0) {
|
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));
|
KEEP_ERRNO((void)pidfile_remove(pfh));
|
||||||
pjdlog_exit(EX_OSERR,
|
pjdlog_exit(EX_OSERR,
|
||||||
"Unable to create control sockets between parent and child");
|
"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.
|
* Create communication channel between child and parent.
|
||||||
*/
|
*/
|
||||||
if (proto_client("socketpair://", &res->hr_event) < 0) {
|
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));
|
KEEP_ERRNO((void)pidfile_remove(pfh));
|
||||||
pjdlog_exit(EX_OSERR,
|
pjdlog_exit(EX_OSERR,
|
||||||
"Unable to create event sockets between child and parent");
|
"Unable to create event sockets between child and parent");
|
||||||
@ -811,6 +813,7 @@ hastd_primary(struct hast_resource *res)
|
|||||||
|
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid < 0) {
|
if (pid < 0) {
|
||||||
|
/* TODO: There's no need for this to be fatal error. */
|
||||||
KEEP_ERRNO((void)pidfile_remove(pfh));
|
KEEP_ERRNO((void)pidfile_remove(pfh));
|
||||||
pjdlog_exit(EX_TEMPFAIL, "Unable to fork");
|
pjdlog_exit(EX_TEMPFAIL, "Unable to fork");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user