diff options
author | Ryan Bloom <rbb@apache.org> | 1999-11-19 19:49:20 +0100 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 1999-11-19 19:49:20 +0100 |
commit | e0ff64c186e6ce067b72a6ed11b15ce72e5dd658 (patch) | |
tree | 57bb60baed7973484a968319fbbbcc35591c42d2 /os/beos | |
parent | First step in removing the fprintf(stderr problem from Apache. Basically, (diff) | |
download | apache2-e0ff64c186e6ce067b72a6ed11b15ce72e5dd658.tar.xz apache2-e0ff64c186e6ce067b72a6ed11b15ce72e5dd658.zip |
Finish the conversion from fprintf(stderr -> ap_log_err.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'os/beos')
-rw-r--r-- | os/beos/beosd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/os/beos/beosd.c b/os/beos/beosd.c index 1e3c0cc5fa..cb369c75de 100644 --- a/os/beos/beosd.c +++ b/os/beos/beosd.c @@ -80,7 +80,8 @@ void beosd_detach(void) exit(0); else if (x == -1) { perror("fork"); - fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0); + ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + "%s: unable to fork new process", ap_server_argv0); exit(1); } */ @@ -88,13 +89,15 @@ void beosd_detach(void) if ((pgrp = setsid()) == -1) { perror("setsid"); - fprintf(stderr, "%s: setsid failed\n", ap_server_argv0); + ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + "%s: setsid failed", ap_server_argv0); exit(1); } /* close out the standard file descriptors */ if (freopen("/dev/null", "r", stdin) == NULL) { - fprintf(stderr, "%s: unable to replace stdin with /dev/null: %s\n", + ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + "%s: unable to replace stdin with /dev/null: %s", ap_server_argv0, strerror(errno)); /* continue anyhow -- note we can't close out descriptor 0 because we * have nothing to replace it with, and if we didn't have a descriptor @@ -103,7 +106,8 @@ void beosd_detach(void) */ } if (freopen("/dev/null", "w", stdout) == NULL) { - fprintf(stderr, "%s: unable to replace stdout with /dev/null: %s\n", + ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + "%s: unable to replace stdout with /dev/null: %s", ap_server_argv0, strerror(errno)); } /* stderr is a tricky one, we really want it to be the error_log, |