primary.c (218045) | primary.c (218049) |
---|---|
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 218045 2011-01-28 21:57:42Z pjd $"); | 32__FBSDID("$FreeBSD: head/sbin/hastd/primary.c 218049 2011-01-28 22:35:46Z 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 --- 801 unchanged lines hidden (view full) --- 842 pjdlog_init(mode); 843 pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); 844 setproctitle("%s (primary)", res->hr_name); 845 846 init_local(res); 847 init_ggate(res); 848 init_environment(res); 849 | 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 --- 801 unchanged lines hidden (view full) --- 842 pjdlog_init(mode); 843 pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role)); 844 setproctitle("%s (primary)", res->hr_name); 845 846 init_local(res); 847 init_ggate(res); 848 init_environment(res); 849 |
850 if (drop_privs() != 0) { 851 cleanup(res); 852 exit(EX_CONFIG); 853 } 854 |
|
850 /* 851 * Create the guard thread first, so we can handle signals from the 852 * very begining. 853 */ 854 error = pthread_create(&td, NULL, guard_thread, res); 855 assert(error == 0); 856 /* 857 * Create the control thread before sending any event to the parent, --- 1199 unchanged lines hidden --- | 855 /* 856 * Create the guard thread first, so we can handle signals from the 857 * very begining. 858 */ 859 error = pthread_create(&td, NULL, guard_thread, res); 860 assert(error == 0); 861 /* 862 * Create the control thread before sending any event to the parent, --- 1199 unchanged lines hidden --- |