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/secondary.c 207371 2010-04-29 15:36:32Z pjd $"); |
32 33#include <sys/param.h> 34#include <sys/time.h> 35#include <sys/bio.h> 36#include <sys/disk.h> 37#include <sys/stat.h> 38 39#include <assert.h> --- 292 unchanged lines hidden (view full) --- 332 res->hr_remoteout = NULL; 333 res->hr_workerpid = pid; 334 return; 335 } 336 (void)pidfile_close(pfh); 337 338 setproctitle("%s (secondary)", res->hr_name); 339 |
340 /* Error in setting timeout is not critical, but why should it fail? */ 341 if (proto_timeout(res->hr_remotein, 0) < 0) 342 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); 343 if (proto_timeout(res->hr_remoteout, res->hr_timeout) < 0) 344 pjdlog_errno(LOG_WARNING, "Unable to set connection timeout"); 345 |
346 init_local(res); 347 init_remote(res, nvin); 348 init_environment(); 349 350 error = pthread_create(&td, NULL, recv_thread, res); 351 assert(error == 0); 352 error = pthread_create(&td, NULL, disk_thread, res); 353 assert(error == 0); --- 350 unchanged lines hidden --- |