smediad.c (910cba4f2f1e94daf355ee8635285732ac47326c) | smediad.c (d4204c85a44d2589b9afff2c81db7044e97f2d1d) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ |
21 |
|
21/* | 22/* |
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. | 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 26#pragma ident "%Z%%M% %I% %E% SMI" 27 28#include <stdio.h> 29#include <stdio_ext.h> 30#include <errno.h> --- 2933 unchanged lines hidden (view full) --- 2964 syslog(LOG_ERR, gettext( 2965 "unable to register (SMSERVERPROG, SMSERVERVERS).")); 2966 exit(1); 2967 } 2968 svcstart_level = get_run_level(); 2969 if (pmclose) { 2970 (void) pthread_attr_init(&attr); 2971 (void) pthread_attr_setscope(&attr, | 24 * Use is subject to license terms. 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29#include <stdio.h> 30#include <stdio_ext.h> 31#include <errno.h> --- 2933 unchanged lines hidden (view full) --- 2965 syslog(LOG_ERR, gettext( 2966 "unable to register (SMSERVERPROG, SMSERVERVERS).")); 2967 exit(1); 2968 } 2969 svcstart_level = get_run_level(); 2970 if (pmclose) { 2971 (void) pthread_attr_init(&attr); 2972 (void) pthread_attr_setscope(&attr, |
2972 PTHREAD_SCOPE_SYSTEM | PTHREAD_CREATE_DETACHED); | 2973 PTHREAD_SCOPE_SYSTEM); 2974 (void) pthread_attr_setdetachstate(&attr, 2975 PTHREAD_CREATE_DETACHED); |
2973 if (pthread_create(NULL, &attr, closedown, NULL) != 0) { 2974 syslog(LOG_ERR, gettext( 2975 "cannot create closedown thread")); 2976 exit(1); 2977 } 2978 (void) pthread_attr_destroy(&attr); 2979 } 2980 svc_run(); --- 12 unchanged lines hidden (view full) --- 2993 */ 2994 debug(1, gettext("server started manually.\n")); 2995 if (server_exists()) { 2996 exit(0); 2997 } 2998 svcstart_level = get_run_level(); 2999 (void) pthread_attr_init(&attr); 3000 (void) pthread_attr_setscope(&attr, | 2976 if (pthread_create(NULL, &attr, closedown, NULL) != 0) { 2977 syslog(LOG_ERR, gettext( 2978 "cannot create closedown thread")); 2979 exit(1); 2980 } 2981 (void) pthread_attr_destroy(&attr); 2982 } 2983 svc_run(); --- 12 unchanged lines hidden (view full) --- 2996 */ 2997 debug(1, gettext("server started manually.\n")); 2998 if (server_exists()) { 2999 exit(0); 3000 } 3001 svcstart_level = get_run_level(); 3002 (void) pthread_attr_init(&attr); 3003 (void) pthread_attr_setscope(&attr, |
3001 PTHREAD_SCOPE_SYSTEM | PTHREAD_CREATE_DETACHED); | 3004 PTHREAD_SCOPE_SYSTEM); 3005 (void) pthread_attr_setdetachstate(&attr, 3006 PTHREAD_CREATE_DETACHED); |
3002 if (pthread_create(NULL, &attr, closedown, NULL) != 0) { 3003 syslog(LOG_ERR, gettext( 3004 "cannot create closedown thread")); 3005 exit(1); 3006 } 3007 (void) pthread_attr_destroy(&attr); 3008 (void) init_server(NULL); 3009 for (;;) (void) pause(); --- 270 unchanged lines hidden --- | 3007 if (pthread_create(NULL, &attr, closedown, NULL) != 0) { 3008 syslog(LOG_ERR, gettext( 3009 "cannot create closedown thread")); 3010 exit(1); 3011 } 3012 (void) pthread_attr_destroy(&attr); 3013 (void) init_server(NULL); 3014 for (;;) (void) pause(); --- 270 unchanged lines hidden --- |