Current File : //usr/share/man/man3scf/smf_method_exit.3scf
'\" te
.\" Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
.TH smf_method_exit 3SCF "23 Apr 2012" "SunOS 5.11" "Service Configuration Facility Library Functions"
.SH NAME
smf_method_exit \- exit from a Service Management Facility service method
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lscf\fR [ \fIlibrary\fR\&.\|.\|. ] 
#include <libscf.h>

void smf_method_exit(int \fIsemantic\fR, const char *\fImessage_short\fR,
     const char *\fImessage_long\fR, const char *\fItextdomain\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBsmf_method_exit()\fR function calls \fBexit\fR(2) with \fIsemantic\fR. The semantic should be one of the method exit codes defined in \fBsmf_method\fR(5).
.sp
.LP
If the calling process is a service method, then the remaining arguments will be made available to its restarter and should conform to the following guidelines:
.RS +4
.TP
.ie t \(bu
.el o
\fImessage_short\fR should point to a null-terminated string with no spaces, containing a short, concise explanation of the reason for calling \fBsmf_method_exit()\fR.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fImessage_long\fR should point to a null-terminated string containing the reason for calling \fBsmf_method_exit()\fR.
.RE
.RS +4
.TP
.ie t \(bu
.el o
\fItextdomain\fR should either be \fINULL\fR, or point to a null-terminated string such that a call to \fBdgettext\fR(3C) with \fItextdomain\fR as \fIdomainname\fR and \fImessage_long\fR as \fImsgid\fR will return an appropriately localized target string.
.RE
.sp
.LP
See \fBsvc.startd\fR(1M) or the manual page for the appropriate restarter for a description of semantic-specific behaviors. Use of \fBsmf_method_exit()\fR with a restarter other than \fBsvc.startd\fR or specifying a semantic not defined in \fBsmf_method\fR(5) may produce unexpected results.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
MT-LevelSafe
.TE

.SH SEE ALSO
.sp
.LP
\fBsvc.startd\fR(1M), \fBexit\fR(2), \fBdgettext\fR(3C), \fBlibscf\fR(3LIB), \fBattributes\fR(5), \fBsmf_method\fR(5)