Deleted Added
full compact
hastd.c (210879) hastd.c (210883)
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/hastd.c 210879 2010-08-05 18:56:24Z pjd $");
31__FBSDID("$FreeBSD: head/sbin/hastd/hastd.c 210883 2010-08-05 19:08:54Z pjd $");
32
33#include <sys/param.h>
34#include <sys/linker.h>
35#include <sys/module.h>
36#include <sys/wait.h>
37
38#include <assert.h>
39#include <err.h>

--- 448 unchanged lines hidden (view full) ---

488 pjdlog_exitx(EX_TEMPFAIL,
489 "Another hastd is already running, pid: %jd.",
490 (intmax_t)otherpid);
491 }
492 /* If we cannot create pidfile from other reasons, only warn. */
493 pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile");
494 }
495
32
33#include <sys/param.h>
34#include <sys/linker.h>
35#include <sys/module.h>
36#include <sys/wait.h>
37
38#include <assert.h>
39#include <err.h>

--- 448 unchanged lines hidden (view full) ---

488 pjdlog_exitx(EX_TEMPFAIL,
489 "Another hastd is already running, pid: %jd.",
490 (intmax_t)otherpid);
491 }
492 /* If we cannot create pidfile from other reasons, only warn. */
493 pjdlog_errno(LOG_WARNING, "Unable to open or create pidfile");
494 }
495
496 cfg = yy_config_parse(cfgpath);
496 cfg = yy_config_parse(cfgpath, true);
497 assert(cfg != NULL);
498
499 signal(SIGHUP, sighandler);
500 signal(SIGCHLD, sighandler);
501
502 /* Listen on control address. */
503 if (proto_server(cfg->hc_controladdr, &cfg->hc_controlconn) < 0) {
504 KEEP_ERRNO((void)pidfile_remove(pfh));

--- 30 unchanged lines hidden ---
497 assert(cfg != NULL);
498
499 signal(SIGHUP, sighandler);
500 signal(SIGCHLD, sighandler);
501
502 /* Listen on control address. */
503 if (proto_server(cfg->hc_controladdr, &cfg->hc_controlconn) < 0) {
504 KEEP_ERRNO((void)pidfile_remove(pfh));

--- 30 unchanged lines hidden ---