commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_6-125-g630311c


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_6-125-g630311c
Date: Sun, 06 Dec 2009 11:59:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  630311c52a6f2aeaa00510c51f4d271f97d16f57 (commit)
       via  0f783cecde8270d82a55921f41b183933f9b1a3d (commit)
       via  5624c55ea97aac67cba5e05befc1538e52a24363 (commit)
       via  5b80086e6f734c6ce5a60f66924f1b8e41758191 (commit)
      from  cd6e4961e06316a39fea71f456579ec2ca089c13 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=630311c52a6f2aeaa00510c51f4d271f97d16f57


commit 630311c52a6f2aeaa00510c51f4d271f97d16f57
Author: Alfred M. Szmidt <address@hidden>
Date:   Sun Dec 6 12:47:06 2009 +0100

    hostname: Do not segfault on lines without a new line character.

diff --git a/ChangeLog b/ChangeLog
index e2c904a..f3836a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-06  Guillem Jover  <address@hidden>
+
+       * hostname/hostname.c (parse_file): Use a do ... while loop
+       instead of a while loop.
+
 2009-12-05  Guillem Jover  <address@hidden>
 
        * configure.ac: Remove libbsd check.
diff --git a/hostname/hostname.c b/hostname/hostname.c
index c00e0f7..9e29e86 100644
--- a/hostname/hostname.c
+++ b/hostname/hostname.c
@@ -377,23 +377,20 @@ parse_file (const char *const file_name)
   if (file == NULL)
     error (EXIT_FAILURE, errno, "fopen");
 
-  nread = getline (&buffer, &size, file);
-  if (nread == -1)
-    error (EXIT_FAILURE, errno, "getline");
-
-  while (feof (file) == 0)
+  do
     {
+      nread = getline (&buffer, &size, file);
+      if (nread == -1)
+       error (EXIT_FAILURE, errno, "getline");
+
       if (buffer[0] != '#')
         {
           name = xmalloc (sizeof (char) * nread);
           sscanf (buffer, "%s", name);
           break;
         }
-
-      nread = getline (&buffer, &size, file);
-      if (nread == -1)
-        error (EXIT_FAILURE, errno, "getline");
     }
+  while (feof (file) == 0);
 
   free (buffer);
   fclose (file);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=0f783cecde8270d82a55921f41b183933f9b1a3d


commit 0f783cecde8270d82a55921f41b183933f9b1a3d
Author: Alfred M. Szmidt <address@hidden>
Date:   Sun Dec 6 12:43:02 2009 +0100

    configure.ac: Remove libbsd check.

diff --git a/ChangeLog b/ChangeLog
index cce9a3a..e2c904a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-12-05  Guillem Jover  <address@hidden>
 
+       * configure.ac: Remove libbsd check.
+
+2009-12-05  Guillem Jover  <address@hidden>
+
        * syslogd/syslogd.c (doexit): New function declaration.
        (main): Install doexit as SIGTERM handler.  Send SIGTERM instead
        of SIGALRM to the parent process.
diff --git a/configure.ac b/configure.ac
index 9bbb08d..bfe17bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,7 +136,6 @@ AC_PROG_YACC
 gl_INIT
 
 ### Checks for libraries.
-AC_CHECK_LIB(bsd, revoke)
 AC_CHECK_LIB(nsl, inet_ntoa)
 AC_CHECK_LIB(resolv, gethostname)
 AC_CHECK_LIB(socket, getpeername)

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=5624c55ea97aac67cba5e05befc1538e52a24363


commit 5624c55ea97aac67cba5e05befc1538e52a24363
Author: Alfred M. Szmidt <address@hidden>
Date:   Sun Dec 6 12:41:26 2009 +0100

    syslogd: fix race condition making syslogd exit with non-zero status.

diff --git a/ChangeLog b/ChangeLog
index b058dac..cce9a3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-05  Guillem Jover  <address@hidden>
+
+       * syslogd/syslogd.c (doexit): New function declaration.
+       (main): Install doexit as SIGTERM handler.  Send SIGTERM instead
+       of SIGALRM to the parent process.
+       (doexit): New function.
+
 2009-12-06  Alfred M. Szmidt  <address@hidden>
 
        * configure.ac (AM_INIT_AUTOMAKE): Depend on automake 1.11.
diff --git a/syslogd/syslogd.c b/syslogd/syslogd.c
index bbe790b..6917f81 100644
--- a/syslogd/syslogd.c
+++ b/syslogd/syslogd.c
@@ -258,6 +258,7 @@ void cfline (const char *, struct filed *);
 const char *cvthname (struct sockaddr_in *);
 int decode (const char *, CODE *);
 void die (int);
+void doexit (int);
 void domark (int);
 void fprintlog (struct filed *, const char *, int, const char *);
 void init (int);
@@ -452,14 +453,15 @@ main (int argc, char *argv[])
   /* Daemonise, if not, set the buffering for line buffer.  */
   if (!NoDetach)
     {
-      /* History:  According to the GNU/Linux sysklogd ChangeLogs
-         "Wed Feb 14 12:42:09 CST 1996:  Dr. Wettstein
-         Parent process of syslogd does not exit until child process has
-         finished initialization process.  This allows rc.* startup to
-         pause until syslogd facility is up and operating."
+      /* History: According to the GNU/Linux sysklogd ChangeLogs "Wed
+         Feb 14 12:42:09 CST 1996: Dr. Wettstein Parent process of
+         syslogd does not exit until child process has finished
+         initialization process.  This allows rc.* startup to pause
+         until syslogd facility is up and operating."
 
          IMO, the GNU/Linux distributors should fix there booting
-         sequence. But we still keep the approach.  */
+         sequence.  But we still keep the approach.  */
+      signal (SIGTERM, doexit);
       ppid = waitdaemon (0, 0, 30);
       if (ppid < 0)
         error (1, errno, "could not become daemon");
@@ -594,7 +596,7 @@ main (int argc, char *argv[])
   /* If we're doing waitdaemon(), tell the parent to exit,
      we are ready to roll.  */
   if (ppid)
-    kill (ppid, SIGALRM);
+    kill (ppid, SIGTERM);
 
   for (;;)
     {
@@ -1504,6 +1506,12 @@ logerror (const char *type)
 }
 
 RETSIGTYPE
+doexit (int signo ARG_UNUSED)
+{
+  _exit (0);
+}
+
+RETSIGTYPE
 die (int signo)
 {
   struct filed *f;

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=5b80086e6f734c6ce5a60f66924f1b8e41758191


commit 5b80086e6f734c6ce5a60f66924f1b8e41758191
Author: Alfred M. Szmidt <address@hidden>
Date:   Sun Dec 6 12:17:47 2009 +0100

    Depend on automake 1.11.

diff --git a/ChangeLog b/ChangeLog
index 0921345..b058dac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-12-06  Alfred M. Szmidt  <address@hidden>
+
+       * configure.ac (AM_INIT_AUTOMAKE): Depend on automake 1.11.
+
 2009-12-05  Guillem Jover  <address@hidden>
 
        * ftpd/logwtmp.c (logwtmp) [_HAVE_UT_TV]: Use a `struct timeval'
diff --git a/configure.ac b/configure.ac
index 13c7b2d..9bbb08d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,8 @@ AC_CONFIG_AUX_DIR([build-aux])
 AM_CONFIG_HEADER([config.h:config.hin])
 AC_CANONICAL_SYSTEM # FIXME: Why not just _HOST?
 
+AM_INIT_AUTOMAKE([1.11])
+
 # config.h turns this on, so make sure it's on for our tests too
 #CPPFLAGS=-D_BSD_SOURCE
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   20 ++++++++++++++++++++
 configure.ac        |    3 ++-
 hostname/hostname.c |   15 ++++++---------
 syslogd/syslogd.c   |   22 +++++++++++++++-------
 4 files changed, 43 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]