Lines Matching refs:method

45  * - stop/refresh requests from the inetd method processes (coming in on a
128 /* Arguments passed to this binary to request which method to execute. */
209 * to the inetd start method process.
244 exec_method(instance_t *instance, instance_method_t method, method_info_t *mi,
413 * Sends a refresh event to the inetd start method process and returns
444 * Sends a stop event to the inetd start method process and wait till it goes
468 * than inetd and in the case we get wedged, the stop method timeout
927 * Set the retries exceeded flag so when the method
1144 * online method, so we can start listening for it.
1167 * Nothing to do here as the method completion code will start
1263 * Returns the state associated with the supplied method being run for an
1267 get_method_state(instance_method_t method)
1272 if (sip->method_running == method)
1281 * Store the method's PID and CID in the repository. If the store fails
1304 * Remove the method's PID and CID from the repository. If the removal
1478 "of %s method of instance %s"), START_METHOD_NAME,
1518 * Refresh the configuration of instance 'inst'. This method gets called as
1619 * start method changed the instance may be running
1622 * if its online method was to change, some part of
1638 } else { /* no bind config / method changes */
1663 * back online, run its refresh method
1776 * instance's disabled method that will do the work
1802 * offline. Then, run the disable method to do the
1837 * Indicate that the offline method is being run
1864 * descriptor, and run the offline method to do
1951 * disable method, as the slightly incorrect
1979 * and then from there run the disable method to do
2006 * to offline, and run the disable method to do the
2149 * If the instance is currently running a method, don't process the
2170 * 'inst''s start method for the 'proto_name' protocol if this parameter is not
2197 * A wait type service's start method has exited.
2198 * Check if the method was fired off in this inetd's
2208 * If a bound fd exists, the method was fired
2260 * of the specified instance's non-start method with the specified status.
2262 * any processing that was blocked on the method running.
2270 error_msg(gettext("The %s method of instance %s failed, "
2295 /* non-failure method return */
2299 * An instance method never returned a supported return code.
2300 * We'll assume this means the method succeeded for now whilst
2303 debug_msg("The %s method of instance %s returned "
2350 * We've just successfully executed the online method. We have
2352 * this method, so now we're online start listening for
2361 * fired off another method), carry out any jobs that were blocked by
2659 passes_basic_exec_checks(const char *instance, const char *method,
2668 "Can't stat the %s method of instance %s: %s"),
2669 method, instance, strerror(errno));
2680 "The %s method of instance %s isn't a regular file"),
2681 method, instance);
2684 error_msg(gettext("The %s method instance %s doesn't have "
2685 "any execute permissions set"), method, instance);
2693 exec_method(instance_t *instance, instance_method_t method, method_info_t *mi,
2703 if (method == IM_START) {
2705 * If wrappers checks fail, pretend the method was exec'd and
2731 if ((method == IM_START) &&
2739 if (method == IM_START) {
2748 "the %s method of instance %s"),
2749 methods[method].name, instance->fmri);
2806 * Set method context before the fd setup below so we can output an
2815 "for the %s method of instance %s");
2818 "control for the %s method of instance %s");
2820 msg = gettext("Failed to bind the %s method of "
2828 error_msg(msg, methods[method].name, instance->fmri);
2837 "for the %s method of instance %s");
2841 msg = gettext("Failed to bind the %s method of "
2847 msg = gettext("Failed to bind the %s method of "
2862 "%s method of instance %s (%s: %s)"),
2863 methods[method].name, instance->fmri, errf,
2871 "method of instance %s (out of memory)");
2876 "method of instance %s (no passwd or shadow "
2885 error_msg(msg, methods[method].name, instance->fmri);
2892 if (method == IM_START) {
2905 env = set_smf_env(mthd_ctxt, instance, methods[method].name);
2919 gettext("Failed to exec %s method of instance %s: %s"),
2920 methods[method].name, instance->fmri, strerror(errno));
2922 if ((method == IM_START) && (instance->config->basic->iswait)) {
2924 * We couldn't exec the start method for a wait type service.
2940 get_method_error_success(instance_method_t method)
2942 switch (method) {
2982 * Runs the specified method of the specified service instance.
2983 * If the method was never specified, we handle it the same as if the
2984 * method was called and returned success, carrying on any transition the
2986 * If the method isn't executable in its specified profile or an error occurs
2987 * forking a process to run the method in the function returns -1.
2988 * If a method binary is successfully executed, the function switches the
2989 * instance's cur state to the method's associated 'run' state and the next
2994 run_method(instance_t *instance, instance_method_t method,
3008 * Don't bother updating the instance's state for the start method
3009 * as there isn't a separate start method state.
3011 if (method != IM_START)
3012 update_instance_states(instance, get_method_state(method),
3013 methods[method].dst_state,
3014 get_method_error_success(method));
3016 if ((mi = cfg->methods[method]) == NULL) {
3018 * If the absent method is IM_OFFLINE, default action needs
3022 if ((method == IM_OFFLINE) && instance->config->basic->iswait) {
3023 warn_msg(gettext("inetd_offline method for instance %s "
3036 /* Handle special method tokens, not allowed on start */
3037 if (method != IM_START) {
3067 * Get the associated method context before the fork so we can
3071 methods[method].name, mi->exec_path)) == NULL)
3078 if (!passes_basic_exec_checks(instance->fmri, methods[method].name,
3084 if (contract_prefork(instance->fmri, method) == -1)
3093 "Unable to fork %s method of instance %s: %s"),
3094 methods[method].name, instance->fmri, strerror(serrno));
3099 exec_method(instance, method, mi, mthd_ctxt, start_info);
3109 * Register this method so its termination is noticed and
3110 * the state transition this method participates in is
3113 if (register_method(instance, child_pid, cid, method,
3117 * of this method, if it's a non-start method treat
3119 * processing on it whilst it languishes in a method
3123 "%s method of instance %s"), methods[method].name,
3125 if (method != IM_START)
3129 add_method_ids(instance, child_pid, cid, method);
3132 if ((method == IM_START) && cfg->basic->do_tcp_trace &&
3153 if (method == IM_START) {
3155 * Only place a start method in maintenance if we're sure
3163 /* treat the failure as if the method ran and failed */
3213 * conrate offline state if these fail. Otherwise, the service's start method
3302 if (ret == -1) /* the method wasn't forked */
3341 * state if the checks fail. Following this, the service's start method is run,
3564 * method timeouts).
3862 char *method;
3884 method = argv[1];
3888 method = argv[2];
3896 if (strcmp(method, START_METHOD_ARG) == 0) {
3898 } else if (strcmp(method, STOP_METHOD_ARG) == 0) {
3900 } else if (strcmp(method, REFRESH_METHOD_ARG) == 0) {