summaryrefslogtreecommitdiffstats
path: root/os/beos/beosd.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/beos/beosd.c')
-rw-r--r--os/beos/beosd.c12
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,