diff options
author | pjd <pjd@FreeBSD.org> | 2012-01-06 23:44:26 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-01-06 23:44:26 +0000 |
commit | cbcf1832ad779b8e125a3d06040bfbb87ec22077 (patch) | |
tree | 1a52b4979a45667be0fcf2e0221d921dd5ca9a90 /sbin/hastd | |
parent | 4066bc047d92259c2ca6a1c722f5167fed995273 (diff) | |
download | FreeBSD-src-cbcf1832ad779b8e125a3d06040bfbb87ec22077.zip FreeBSD-src-cbcf1832ad779b8e125a3d06040bfbb87ec22077.tar.gz |
fork(2) returns -1 on failure, not some random negative number.
MFC after: 3 days
Diffstat (limited to 'sbin/hastd')
-rw-r--r-- | sbin/hastd/primary.c | 2 | ||||
-rw-r--r-- | sbin/hastd/secondary.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index be1d7bb..243269d 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -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"); diff --git a/sbin/hastd/secondary.c b/sbin/hastd/secondary.c index 4f67efd..16f92b1 100644 --- a/sbin/hastd/secondary.c +++ b/sbin/hastd/secondary.c @@ -401,7 +401,7 @@ hastd_secondary(struct hast_resource *res, struct nv *nvin) } pid = fork(); - if (pid < 0) { + if (pid == -1) { KEEP_ERRNO((void)pidfile_remove(pfh)); pjdlog_exit(EX_OSERR, "Unable to fork"); } |