]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ap_server_argv0 was undefined. Use a simple default (basename(argv[0]))
authorMartin Kraemer <martin@apache.org>
Thu, 7 Oct 1999 21:48:30 +0000 (21:48 +0000)
committerMartin Kraemer <martin@apache.org>
Thu, 7 Oct 1999 21:48:30 +0000 (21:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83945 13f79535-47bb-0310-9956-ffa450edef68

server/main.c

index 5def25f3227b8fc4235bd9c30d39bd8745d83120..2409586542e95553ae45f9e16f97d84d8a0db99a 100644 (file)
@@ -289,6 +289,15 @@ API_EXPORT_NONSTD(int)        main(int argc, char *argv[])
     ap_context_t *ptemp;               /* Pool for temporary config stuff */
     ap_context_t *pcommands;           /* Pool for -C and -c switches */
 
+#ifndef WIN32
+    if ((ap_server_argv0 = strrchr(argv[0], '/')) != NULL)
+#else
+    if ((ap_server_argv0 = strrchr(argv[0], '\\')) != NULL)
+#endif
+        ++ap_server_argv0;
+    else
+       ap_server_argv0 = argv[0];
+
     ap_util_uri_init();
 
     g_pHookPool=pglobal;