Deleted Added
full compact
primary.c (211897) primary.c (211977)
1/*-
2 * Copyright (c) 2009 The FreeBSD Foundation
3 * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>
4 * All rights reserved.
5 *
6 * This software was developed by Pawel Jakub Dawidek under sponsorship from
7 * the FreeBSD Foundation.
8 *

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

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

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

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 211897 2010-08-27 21:20:32Z pjd $");
32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 211977 2010-08-29 21:41:53Z pjd $");
33
34#include <sys/types.h>
35#include <sys/time.h>
36#include <sys/bio.h>
37#include <sys/disk.h>
38#include <sys/refcount.h>
39#include <sys/stat.h>
40

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

781 primary_exit(EX_TEMPFAIL, "Unable to fork");
782 }
783
784 if (pid > 0) {
785 /* This is parent. */
786 res->hr_workerpid = pid;
787 return;
788 }
33
34#include <sys/types.h>
35#include <sys/time.h>
36#include <sys/bio.h>
37#include <sys/disk.h>
38#include <sys/refcount.h>
39#include <sys/stat.h>
40

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

781 primary_exit(EX_TEMPFAIL, "Unable to fork");
782 }
783
784 if (pid > 0) {
785 /* This is parent. */
786 res->hr_workerpid = pid;
787 return;
788 }
789
789 (void)pidfile_close(pfh);
790 (void)pidfile_close(pfh);
791 hook_fini();
790
791 setproctitle("%s (primary)", res->hr_name);
792
793 signal(SIGHUP, SIG_DFL);
794 signal(SIGCHLD, SIG_DFL);
795
796 hook_init();
797 init_local(res);

--- 1199 unchanged lines hidden ---
792
793 setproctitle("%s (primary)", res->hr_name);
794
795 signal(SIGHUP, SIG_DFL);
796 signal(SIGCHLD, SIG_DFL);
797
798 hook_init();
799 init_local(res);

--- 1199 unchanged lines hidden ---