Date: Fri, 6 Jan 2012 23:44:26 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r229744 - head/sbin/hastd Message-ID: <201201062344.q06NiQi4013800@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Fri Jan 6 23:44:26 2012 New Revision: 229744 URL: http://svn.freebsd.org/changeset/base/229744 Log: fork(2) returns -1 on failure, not some random negative number. MFC after: 3 days Modified: head/sbin/hastd/primary.c head/sbin/hastd/secondary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Fri Jan 6 23:33:33 2012 (r229743) +++ head/sbin/hastd/primary.c Fri Jan 6 23:44:26 2012 (r229744) @@ -886,7 +886,7 @@ hastd_primary(struct hast_resource *res) } pid = fork(); - if (pid < 0) { + if (pid == -1) { /* TODO: There's no need for this to be fatal error. */ KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_TEMPFAIL, "Unable to fork"); Modified: head/sbin/hastd/secondary.c ============================================================================== --- head/sbin/hastd/secondary.c Fri Jan 6 23:33:33 2012 (r229743) +++ head/sbin/hastd/secondary.c Fri Jan 6 23:44:26 2012 (r229744) @@ -401,7 +401,7 @@ hastd_secondary(struct hast_resource *re } pid = fork(); - if (pid < 0) { + if (pid == -1) { KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to fork"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201062344.q06NiQi4013800>