You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2012/10/04 13:44:35 UTC

svn commit: r1393997 - /httpd/httpd/trunk/modules/arch/unix/mod_systemd.c

Author: jorton
Date: Thu Oct  4 11:44:34 2012
New Revision: 1393997

URL: http://svn.apache.org/viewvc?rev=1393997&view=rev
Log:
* modules/arch/unix/mod_systemd.c (systemd_pre_mpm): Simplify code
  slightly; no functional change.  
  Use AP_DECLARE_MODULE.

Modified:
    httpd/httpd/trunk/modules/arch/unix/mod_systemd.c

Modified: httpd/httpd/trunk/modules/arch/unix/mod_systemd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/unix/mod_systemd.c?rev=1393997&r1=1393996&r2=1393997&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/unix/mod_systemd.c (original)
+++ httpd/httpd/trunk/modules/arch/unix/mod_systemd.c Thu Oct  4 11:44:34 2012
@@ -37,15 +37,12 @@
 static int systemd_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
 {
     int rv;
-    pid_t pid;
-    pid = getpid();
 
     ap_extended_status = 1;
 
     rv = sd_notifyf(0, "READY=1\n"
                     "STATUS=Processing requests...\n"
-                    "MAINPID=%lu",
-                    (unsigned long) pid);
+                    "MAINPID=%" APR_PID_T_FMT, getpid());
     if (rv < 0) {
         ap_log_perror(APLOG_MARK, APLOG_ERR, 0, p, APLOGNO(02395)
                      "sd_notifyf returned an error %d", rv);
@@ -91,8 +88,7 @@ static void systemd_register_hooks(apr_p
     ap_hook_monitor(systemd_monitor, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
-module AP_MODULE_DECLARE_DATA systemd_module =
-{
+AP_DECLARE_MODULE(systemd) = {
     STANDARD20_MODULE_STUFF,
     NULL,
     NULL,