pad);
#endif
#ifdef AP_MPM_WANT_SIGNAL_SERVER
+#ifdef AP_MPM_SUPPORTS_GRACEFUL_STOP
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ " %s [-k start|restart|graceful|graceful-stop|stop]",
+ pad);
+#else
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" %s [-k start|restart|graceful|stop]",
pad);
+#endif /* AP_MPM_SUPPORTS_GRACEFUL_STOP */
#endif
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" %s [-v] [-V] [-h] [-l] [-L] [-t] [-S]", pad);
return 1;
}
}
+
+ if (!strcmp(dash_k_arg, "graceful-stop")) {
+#ifdef AP_MPM_SUPPORTS_GRACEFUL_STOP
+ if (!running) {
+ printf("%s\n", status);
+ }
+ else {
+ *exit_status = send_signal(otherpid, AP_SIG_GRACEFUL_STOP);
+ }
+#else
+ printf("httpd MPM \"" MPM_NAME "\" does not support graceful-stop\n");
+#endif
+ return 1;
+ }
return 0;
}
case 'k':
if (!dash_k_arg) {
if (!strcmp(optarg, "start") || !strcmp(optarg, "stop") ||
- !strcmp(optarg, "restart") || !strcmp(optarg, "graceful")) {
+ !strcmp(optarg, "restart") || !strcmp(optarg, "graceful") ||
+ !strcmp(optarg, "graceful-stop")) {
dash_k_arg = optarg;
break;
}