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);
The smf_method_exit() function calls exit(2) with semantic. The semantic should be one of the method exit codes defined in smf_method(5).
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(1M) 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(5) may produce unexpected results.
See attributes(5) for descriptions of the following attributes:
|
svc.startd(1M), exit(2) , dgettext(3C), libscf (3LIB), attributes(5), smf_method(5)