--- nagios.orig/base/checks.c   2008-02-28 20:26:12.000000000 +0100
+++ nagios/base/checks.c        2008-04-12 18:22:09.000000000 +0200
@@ -618,8 +618,15 @@
        pid=fork();
 
        /* an error occurred while trying to fork */
-       if(pid==-1)
+       if(pid==-1){
                fork_error=TRUE;
+               logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: The check of service '%s' on host '%s' could not be performed due to a fork() error: '%s'.  The check will be rescheduled. \n",svc->description,svc->host_name, strerror(errno));
+
+               log_debug_info(DEBUGL_CHECKS,0,"Check of service '%s' on host '%s' could not be performed due to a fork() error: '%s'!\n",svc->description,svc->host_name, strerror(errno));
+
+               write_to_logs_and_console(temp_buffer, NSLOG_RUNTIME_WARNING, TRUE);
+               my_free(temp_buffer);
+       }
 
        /* if we are in the child process... */
        else if(pid==0){
@@ -850,15 +857,8 @@
                }
 
        /* see if we could run the check... */
-       if(fork_error==TRUE){
-
-               /* log an error */
-               logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: The check of service '%s' on host '%s' could not be performed due to a fork() error.  The check will be rescheduled.\n",svc->description,svc->host_name);
-
-               log_debug_info(DEBUGL_CHECKS,0,"Check of service '%s' on host '%s' could not be performed due to a fork() error!\n",svc->description,svc->host_name);
-
+       if(fork_error==TRUE)
                return ERROR;
-               }
 
        return OK;
         }
