]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2568. [bug] Report when the write to indicate a otherwise
authorMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 03:08:22 +0000 (03:08 +0000)
committerMark Andrews <marka@isc.org>
Mon, 2 Mar 2009 03:08:22 +0000 (03:08 +0000)
                        successful start fails. [RT #19360]

CHANGES
bin/named/unix/os.c

diff --git a/CHANGES b/CHANGES
index dcdd2ea7f288647008cd8399c7ceb789be95f41b..3013e31650b2ca9faa156717cb473d82ab0749ea 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2568.  [bug]           Report when the write to indicate a otherwise                                   successful start fails. [RT #19360]
+
 2567.  [bug]           dst__privstruct_writefile() could miss write errors.
                        write_public_key() could miss write errors.
                        dnssec-dsfromkey could miss write errors.
index d59ccb330e72ea0fc741dcee8ab87e927433551e..eb8682a485b7b40fa1b6b93155a0fc07b30f2edf 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: os.c,v 1.94 2009/02/16 23:48:04 tbox Exp $ */
+/* $Id: os.c,v 1.95 2009/03/02 03:08:22 marka Exp $ */
 
 /*! \file */
 
@@ -462,10 +462,12 @@ ns_os_started(void) {
        char buf = 0;
 
        /*
-        * Signal to the parent that we stated successfully.
+        * Signal to the parent that we started successfully.
         */
        if (dfd[0] != -1 && dfd[1] != -1) {
-               write(dfd[1], &buf, 1);
+               if (write(dfd[1], &buf, 1) != 1)
+                       ns_main_earlyfatal("unable to signal parent that we "
+                                          "otherwise started successfully.");
                close(dfd[1]);
                dfd[0] = dfd[1] = -1;
        }