-/* Copyright 1999-2004 The Apache Software Foundation
+/* Copyright 1999-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static void ap_str_toupper(char *str)
{
while (*str) {
- *str = apr_toupper(*str);
- ++str;
+ *str = apr_toupper(*str);
+ ++str;
}
}
if (one_process) {
- type = forktype = bs2_noFORK;
+ type = forktype = bs2_noFORK;
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, server,
- "The debug mode of Apache should only "
- "be started by an unprivileged user!");
- return 0;
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, server,
+ "The debug mode of Apache should only "
+ "be started by an unprivileged user!");
+ return 0;
}
return 0;
switch (os_forktype(0)) {
case bs2_FORK:
- pid = fork();
- break;
+ pid = fork();
+ break;
case bs2_UFORK:
- apr_cpystrn(username, user, sizeof username);
+ apr_cpystrn(username, user, sizeof username);
- /* Make user name all upper case - for some versions of ufork() */
- ap_str_toupper(username);
+ /* Make user name all upper case - for some versions of ufork() */
+ ap_str_toupper(username);
- pid = ufork(username);
- if (pid == -1 && errno == EPERM) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
- NULL, "ufork: Possible mis-configuration "
- "for user %s - Aborting.", user);
- exit(1);
- }
- break;
+ pid = ufork(username);
+ if (pid == -1 && errno == EPERM) {
+ ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
+ NULL, "ufork: Possible mis-configuration "
+ "for user %s - Aborting.", user);
+ exit(1);
+ }
+ break;
default:
- pid = 0;
- break;
+ pid = 0;
+ break;
}
return pid;