[Hide Content]--- icd-main.cpp.orig 2007-01-29 10:47:09.000000000 +0100
+++ icd-main.cpp 2007-01-29 10:48:34.000000000 +0100
@@ -99,7 +99,9 @@
do {} while (read(g_cldPipe[0], g_cldPipeBuf, CHILD_PIPE_BUF_LEN) > 0);
// now write one character
- write(g_cldPipe[1], "X", 1);
+ if (write(g_cldPipe[1], "X", 1) <= 0) {
+ syslog(LOG_WARNING, "failed to send SIGCHLD token to notification pipe");
+ }
break;
default:;
}
@@ -361,8 +363,13 @@
}
try {
- if (g_daemon)
- daemon(0, 0);
+ if (g_daemon) {
+ if (daemon(0, 0) == -1) {
+ closelog();
+ perror("error calling daemon()");
+ return 1;
+ }
+ }
try {
if (!app.Lock()) {