Go to main content

man pages section 3: Extended Library Functions, Volume 4

Exit Print View

Updated: Thursday, June 13, 2019
 
 

smf_method_exit(3SCF)

Name

smf_method_exit - exit from a Service Management Facility service method

Synopsis

cc [ flag… ] file–lscf [ library… ] 
#include <libscf.h>

void smf_method_exit(int semantic, const char *message_short,
     const char *message_long, const char *textdomain);

Description

The smf_method_exit() function calls exit(2) with semantic. The semantic should be one of the method exit codes defined in smf_method(7).

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:

  • message_short should point to a null-terminated string with no spaces, containing a short, concise explanation of the reason for calling smf_method_exit().

  • message_long should point to a null-terminated string containing the reason for calling smf_method_exit().

  • textdomain should either be NULL, or point to a null-terminated string such that a call to dgettext(3C) with textdomain as domainname and message_long as msgid will return an appropriately localized target string.

See svc.startd(8) or the manual page for the appropriate restarter for a description of semantic-specific behaviors. Use of smf_method_exit () with a restarter other than svc.startd or specifying a semantic not defined in smf_method(7) may produce unexpected results.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

exit(2), dgettext(3C), libscf(3LIB), attributes(7), smf_method(7), svc.startd(8)