Hello community,
here is the log from the commit of package libdaemon
checked in at Thu Jul 5 00:43:18 CEST 2007.
--------
--- libdaemon/libdaemon.changes 2006-12-14 17:24:53.000000000 +0100
+++ /mounts/work_src_done/STABLE/libdaemon/libdaemon.changes 2007-07-03 19:59:04.407616000 +0200
@@ -1,0 +2,14 @@
+Tue Jul 3 19:36:21 CEST 2007 - maw@suse.de
+
+- Update to version 0.11
+ + automatically detect whether lynx is installed
+ + properly set errno on every error condition
+ + add new function daemon_close_all() to close all open file
+ descriptors except a given set
+ + add daemon_logv(), which is identical to daemon_log(), but
+ takes a va_list argument
+ + add daemon_execv() in similar style
+ + other fixes
+- Remove upstreamed libdaemon-attributes.patch.
+
+-------------------------------------------------------------------
Old:
----
libdaemon-0.10.tar.bz2
libdaemon-attributes.patch
New:
----
libdaemon-0.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libdaemon.spec ++++++
--- /var/tmp/diff_new_pack.z17976/_old 2007-07-05 00:42:34.000000000 +0200
+++ /var/tmp/diff_new_pack.z17976/_new 2007-07-05 00:42:34.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package libdaemon (Version 0.10)
+# spec file for package libdaemon (Version 0.11)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -13,14 +13,13 @@
Name: libdaemon
BuildRequires: doxygen lynx
URL: http://0pointer.de/lennart/projects/libdaemon/
-Version: 0.10
-Release: 39
+Version: 0.11
+Release: 1
Summary: Lightweight C library That Eases the Writing of UNIX Daemons
-License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
+License: LGPL v2 or later
Group: System/Libraries
Source: %{name}-%{version}.tar.bz2
-Patch: %{name}-attributes.patch
-Patch1: libdaemon-0.10-testd-fix-FD_SET.diff
+Patch0: libdaemon-0.10-testd-fix-FD_SET.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr
%package devel
@@ -85,8 +84,7 @@
%prep
%setup
-%patch
-%patch1 -p0
+%patch0 -p0
%build
export CFLAGS="$RPM_OPT_FLAGS"
@@ -117,7 +115,18 @@
%{_libdir}/pkgconfig/libdaemon.pc
/usr/include/libdaemon
-%changelog -n libdaemon
+%changelog
+* Tue Jul 03 2007 - maw@suse.de
+- Update to version 0.11
+ + automatically detect whether lynx is installed
+ + properly set errno on every error condition
+ + add new function daemon_close_all() to close all open file
+ descriptors except a given set
+ + add daemon_logv(), which is identical to daemon_log(), but
+ takes a va_list argument
+ + add daemon_execv() in similar style
+ + other fixes
+- Remove upstreamed libdaemon-attributes.patch.
* Thu Dec 14 2006 - seife@suse.de
- fix testd build
* Wed Jan 25 2006 - mls@suse.de
++++++ libdaemon-0.10.tar.bz2 -> libdaemon-0.11.tar.bz2 ++++++
++++ 22930 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/config.h.in new/libdaemon-0.11/config.h.in
--- old/libdaemon-0.10/config.h.in 2005-11-24 14:46:57.000000000 +0100
+++ new/libdaemon-0.11/config.h.in 2007-06-11 17:47:13.000000000 +0200
@@ -146,7 +146,7 @@
/* Define to `int' if does not define. */
#undef pid_t
-/* Define to `unsigned' if does not define. */
+/* Define to `unsigned int' if does not define. */
#undef size_t
/* Define as `fork' if `vfork' does not work. */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/configure.ac new/libdaemon-0.11/configure.ac
--- old/libdaemon-0.10/configure.ac 2005-11-24 14:38:53.000000000 +0100
+++ new/libdaemon-0.11/configure.ac 2007-06-11 17:46:06.000000000 +0200
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-# $Id: configure.ac 108 2005-11-24 13:38:53Z lennart $
+# $Id: configure.ac 122 2007-06-11 15:46:06Z lennart $
# This file is part of libdaemon.
#
@@ -21,7 +21,7 @@
# USA
AC_PREREQ(2.59)
-AC_INIT([libdaemon],[0.10],[mzqnrzba (at) 0pointer (dot) de])
+AC_INIT([libdaemon],[0.11],[mzqnrzba (at) 0pointer (dot) de])
AC_CONFIG_SRCDIR([libdaemon/dfork.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
@@ -34,8 +34,8 @@
fi
# Checks for programs.
-AC_GNU_SOURCE
AC_PROG_CC
+AC_GNU_SOURCE
AC_PROG_CXX
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
@@ -98,15 +98,15 @@
*) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
esac],[lynx=yes])
-if test x$lynx = xyes ; then
+if test x$lynx != xno ; then
AC_CHECK_PROG(have_lynx, lynx, yes, no)
- if test x$have_lynx = xno ; then
- AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
+ if test x$lynx = xyes && test x$have_lynx = xno ; then
+ AC_MSG_ERROR([*** Lynx enabled but couldn't find lynx ***])
fi
fi
-AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
+AM_CONDITIONAL([USE_LYNX], [test "x$lynx" != xno])
AC_CONFIG_FILES([libdaemon/Makefile Makefile doc/Makefile doc/README.html doc/doxygen.conf examples/Makefile libdaemon.spec libdaemon.pc])
AC_OUTPUT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/doc/README new/libdaemon-0.11/doc/README
--- old/libdaemon-0.10/doc/README 2005-11-24 14:56:11.000000000 +0100
+++ new/libdaemon-0.11/doc/README 2007-06-22 17:09:14.000000000 +0200
@@ -1,5 +1,4 @@
-
- libdaemon 0.10
+ libdaemon 0.11
Copyright 2003-2005 Lennart Poettering
@@ -15,15 +14,15 @@
License
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+ General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
@@ -32,56 +31,65 @@
News
+ Fri Jun 22 2007:
+
+ [10]Version 0.11 released; changes include: automatically detect
+ whether lynx is installed; properly set errno on every error condition;
+ add new function daemon_close_all() to close all open file descriptors
+ except a given set; add daemon_logv(), which is identical to
+ daemon_log(), but takes a va_list argument; add daemon_execv() in
+ similar style; other fixes
+
Thu Nov 24 2005:
- [10]Version 0.10 released; changes include: make logging compatible
+ [11]Version 0.10 released; changes include: make logging compatible
with daemons running in a chroot() environment
Fri Nov 18 2005:
- [11]Version 0.9 released; changes include: portability (FreeBSD,
+ [12]Version 0.9 released; changes include: portability (FreeBSD,
NetBSD, OpenBSD, Darwin, Solaris, Cygwin); some minor header file
cleanups; fix access mode of PID files; other cleanups; license change
from GPL to LGPL
Sat Jun 4 2005:
- [12]Version 0.8 released; changes include: proper PID file locking
+ [13]Version 0.8 released; changes include: proper PID file locking
Sat Dec 18 2004:
- [13]Version 0.7 released; changes include: minor cleanups; C++
+ [14]Version 0.7 released; changes include: minor cleanups; C++
compatibility; gcc 2.95 compatiblity
Wed Apr 7 2004:
- [14]Version 0.6 released; changes include: backgrounding fixes, minor
+ [15]Version 0.6 released; changes include: backgrounding fixes, minor
other stuff
Tue Feb 10 2004:
- [15]Version 0.5 released; changes include: signal handling fix,
- forking fix
+ [16]Version 0.5 released; changes include: signal handling fix, forking
+ fix
Sat Jan 10 2004:
- [16]Version 0.4 released; changes include: new module dexec.c; added
+ [17]Version 0.4 released; changes include: new module dexec.c; added
pkg-config support.
Mon Oct 20 2003:
- [17]Version 0.3 released; changes include: documentation update, build
+ [18]Version 0.3 released; changes include: documentation update, build
fixes, RPM spec file added, added new function int
daemon_pid_file_kill_wait().
Thu July 10 2003:
- [18]Version 0.2 released; changes include: ugly umask error fix,
+ [19]Version 0.2 released; changes include: ugly umask error fix,
documentation update
Mon July 7 2003:
- [19]Version 0.1 released
+ [20]Version 0.1 released
Overview
@@ -100,16 +108,16 @@
APIs like these are used in most daemon software available. It is not
that simple to get it done right and code duplication is not a goal.
- libdaemon is currently used by [20]ifplugd, [21]Avahi, [22]ivam2,
- [23]Nautilus-Share and [24]aeswepd.
+ libdaemon is currently used by [21]ifplugd, [22]Avahi, [23]ivam2,
+ [24]Nautilus-Share and [25]aeswepd.
Current Status
- Version 0.10 is feature complete.
+ Version 0.11 is feature complete.
Documentation
- An extensive API reference is [25]available
+ An extensive API reference is [26]available
Requirements
@@ -138,23 +146,23 @@
Download
The newest release is always available from
- [26]http://0pointer.de/lennart/projects/libdaemon/
+ [27]http://0pointer.de/lennart/projects/libdaemon/
- Get libdaemon's development sources from the [27]Subversion
- [28]repository ([29]viewcvs):
+ Get libdaemon's development sources from the [28]Subversion
+ [29]repository ([30]viewcvs):
svn checkout svn://svn.0pointer.de/libdaemon/trunk libdaemon
You may find an up to date Debian package of libdaemon on the
- [30]Debian package repository.
+ [31]Debian package repository.
If you want to be notified whenever I release a new version of this
- software use the subscription feature of [31]Freshmeat.
- _________________________________________________________________
+ software use the subscription feature of [32]Freshmeat.
+ __________________________________________________________________
- Lennart Poettering , November 2005
+ Lennart Poettering , June 2007
- $Id: README.html.in 110 2005-11-24 13:56:04Z lennart $
+ $Id: README.html.in 124 2007-06-22 15:07:50Z lennart $
References
@@ -167,25 +175,26 @@
7. README#installation
8. README#acks
9. README#download
- 10. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz
- 11. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.9.tar.gz
- 12. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.8.tar.gz
- 13. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.7.tar.gz
- 14. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.6.tar.gz
- 15. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.5.tar.gz
- 16. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.4.tar.gz
- 17. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.3.tar.gz
- 18. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.2.tar.gz
- 19. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.1.tar.gz
- 20. http://0pointer.de/lennart/projects/ifplugd/
- 21. http://freedesktop.org/Software/Avahi
- 22. http://0pointer.de/lennart/projects/ivam2/
- 23. http://gentoo.ovibes.net/nautilus-share/mediawiki-1.4.4/index.php/Accueil
- 24. http://0pointer.de/lennart/projects/aeswepd/
- 25. reference/html/index.html
- 26. http://0pointer.de/lennart/projects/libdaemon/
- 27. http://subversion.tigris.org/
- 28. svn://svn.0pointer.de/libdaemon
- 29. http://0pointer.de/cgi-bin/viewcvs.cgi/?root=libdaemon
- 30. http://packages.debian.org/libdaemon0
- 31. http://freshmeat.net/projects/libdaemon/
+ 10. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.11.tar.gz
+ 11. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz
+ 12. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.9.tar.gz
+ 13. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.8.tar.gz
+ 14. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.7.tar.gz
+ 15. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.6.tar.gz
+ 16. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.5.tar.gz
+ 17. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.4.tar.gz
+ 18. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.3.tar.gz
+ 19. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.2.tar.gz
+ 20. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.1.tar.gz
+ 21. http://0pointer.de/lennart/projects/ifplugd/
+ 22. http://freedesktop.org/Software/Avahi
+ 23. http://0pointer.de/lennart/projects/ivam2/
+ 24. http://gentoo.ovibes.net/nautilus-share/mediawiki-1.4.4/index.php/Accueil
+ 25. http://0pointer.de/lennart/projects/aeswepd/
+ 26. reference/html/index.html
+ 27. http://0pointer.de/lennart/projects/libdaemon/
+ 28. http://subversion.tigris.org/
+ 29. svn://svn.0pointer.de/libdaemon
+ 30. http://0pointer.de/cgi-bin/viewcvs.cgi/?root=libdaemon
+ 31. http://packages.debian.org/libdaemon0
+ 32. http://freshmeat.net/projects/libdaemon/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/doc/README.html new/libdaemon-0.11/doc/README.html
--- old/libdaemon-0.10/doc/README.html 2005-11-24 14:56:11.000000000 +0100
+++ new/libdaemon-0.11/doc/README.html 2007-06-22 17:08:28.000000000 +0200
@@ -3,12 +3,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<title>libdaemon 0.10</title>
+<title>libdaemon 0.11</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
-<h1><a name="top">libdaemon 0.10</a></h1>
+<h1><a name="top">libdaemon 0.11</a></h1>
<p><i>Copyright 2003-2005 Lennart Poettering <mzqnrzba (at) 0pointer (dot) de></i></p>
@@ -42,6 +42,9 @@
<h2><a name="news">News</a></h2>
+<div class="news-date">Fri Jun 22 2007: </div>
+<p class="news-text"><a href="http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.11.tar.gz">Version 0.11</a> released; changes include: automatically detect whether lynx is installed; properly set <tt>errno</tt> on every error condition; add new function <tt>daemon_close_all()</tt> to close all open file descriptors except a given set; add <tt>daemon_logv()</tt>, which is identical to <tt>daemon_log()</tt>, but takes a <tt>va_list</tt> argument; add <tt>daemon_execv()</tt> in similar style; other fixes</p>
+
<div class="news-date">Thu Nov 24 2005: </div>
<p class="news-text"><a href="http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz">Version 0.10</a> released; changes include: make logging compatible with daemons running in a <tt>chroot()</tt> environment</p>
@@ -108,7 +111,7 @@
<h2><a name="status">Current Status</a></h2>
-<p>Version 0.10 is feature complete.</p>
+<p>Version 0.11 is feature complete.</p>
<h2><a name="documentation">Documentation</a></h2>
@@ -152,8 +155,8 @@
<p>If you want to be notified whenever I release a new version of this software use the subscription feature of <a href="http://freshmeat.net/projects/libdaemon/">Freshmeat</a>.</p>
<hr/>
-<address class="grey">Lennart Poettering <mzqnrzba (at) 0pointer (dot) de>, November 2005</address>
-<div class="grey"><i>$Id: README.html.in 110 2005-11-24 13:56:04Z lennart $</i></div>
+<address class="grey">Lennart Poettering <mzqnrzba (at) 0pointer (dot) de>, June 2007</address>
+<div class="grey"><i>$Id: README.html.in 124 2007-06-22 15:07:50Z lennart $</i></div>
</body>
</html>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/doc/README.html.in new/libdaemon-0.11/doc/README.html.in
--- old/libdaemon-0.10/doc/README.html.in 2005-11-24 14:56:04.000000000 +0100
+++ new/libdaemon-0.11/doc/README.html.in 2007-06-22 17:07:50.000000000 +0200
@@ -42,6 +42,9 @@
<h2><a name="news">News</a></h2>
+<div class="news-date">Fri Jun 22 2007: </div>
+<p class="news-text"><a href="@PACKAGE_URL@libdaemon-0.11.tar.gz">Version 0.11</a> released; changes include: automatically detect whether lynx is installed; properly set <tt>errno</tt> on every error condition; add new function <tt>daemon_close_all()</tt> to close all open file descriptors except a given set; add <tt>daemon_logv()</tt>, which is identical to <tt>daemon_log()</tt>, but takes a <tt>va_list</tt> argument; add <tt>daemon_execv()</tt> in similar style; other fixes</p>
+
<div class="news-date">Thu Nov 24 2005: </div>
<p class="news-text"><a href="@PACKAGE_URL@libdaemon-0.10.tar.gz">Version 0.10</a> released; changes include: make logging compatible with daemons running in a <tt>chroot()</tt> environment</p>
@@ -152,8 +155,8 @@
<p>If you want to be notified whenever I release a new version of this software use the subscription feature of <a href="http://freshmeat.net/projects/libdaemon/">Freshmeat</a>.</p>
<hr/>
-<address class="grey">Lennart Poettering <@PACKAGE_BUGREPORT@>, November 2005</address>
-<div class="grey"><i>$Id: README.html.in 110 2005-11-24 13:56:04Z lennart $</i></div>
+<address class="grey">Lennart Poettering <@PACKAGE_BUGREPORT@>, June 2007</address>
+<div class="grey"><i>$Id: README.html.in 124 2007-06-22 15:07:50Z lennart $</i></div>
</body>
</html>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/examples/testd.c new/libdaemon-0.11/examples/testd.c
--- old/libdaemon-0.10/examples/testd.c 2005-11-18 21:39:54.000000000 +0100
+++ new/libdaemon-0.11/examples/testd.c 2007-06-11 17:45:51.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: testd.c 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: testd.c 121 2007-06-11 15:45:51Z lennart $ */
/*
* This file is part of libdaemon.
@@ -46,11 +46,7 @@
/* Kill daemon with SIGINT */
/* Check if the new function daemon_pid_file_kill_wait() is available, if it is, use it. */
-#ifdef DAEMON_PID_FILE_KILL_WAIT_AVAILABLE
if ((ret = daemon_pid_file_kill_wait(SIGINT, 5)) < 0)
-#else
- if ((ret = daemon_pid_file_kill(SIGINT)) < 0)
-#endif
daemon_log(LOG_WARNING, "Failed to kill daemon");
return ret < 0 ? 1 : 0;
@@ -89,6 +85,11 @@
int fd, quit = 0;
fd_set fds;
+ if (daemon_close_all(-1) < 0) {
+ daemon_log(LOG_ERR, "Failed to close all file descriptors: %s", strerror(errno));
+ goto finish;
+ }
+
/* Create the PID file */
if (daemon_pid_file_create() < 0) {
daemon_log(LOG_ERR, "Could not create PID file (%s).", strerror(errno));
@@ -99,7 +100,7 @@
}
/* Initialize signal handling */
- if (daemon_signal_init(SIGINT, SIGQUIT, SIGHUP, 0) < 0) {
+ if (daemon_signal_init(SIGINT, SIGTERM, SIGQUIT, SIGHUP, 0) < 0) {
daemon_log(LOG_ERR, "Could not register signal handlers (%s).", strerror(errno));
daemon_retval_send(2);
goto finish;
@@ -147,7 +148,8 @@
case SIGINT:
case SIGQUIT:
- daemon_log(LOG_WARNING, "Got SIGINT or SIGQUIT");
+ case SIGTERM:
+ daemon_log(LOG_WARNING, "Got SIGINT, SIGQUIT or SIGTERM");
quit = 1;
break;
@@ -163,7 +165,7 @@
/* Do a cleanup */
finish:
daemon_log(LOG_INFO, "Exiting...");
-
+ daemon_retval_send(-1);
daemon_signal_done();
daemon_pid_file_remove();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dexec.c new/libdaemon-0.11/libdaemon/dexec.c
--- old/libdaemon-0.10/libdaemon/dexec.c 2005-11-18 21:33:51.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dexec.c 2007-06-11 17:33:26.000000000 +0200
@@ -39,19 +39,19 @@
#include "dlog.h"
#include "dsignal.h"
+#include "dfork.h"
#include "dexec.h"
#define MAX_ARGS 100
-int daemon_exec(const char *dir, int *ret, const char *prog, ...) {
+int daemon_execv(const char *dir, int *ret, const char *prog, va_list ap) {
pid_t pid;
int p[2];
unsigned n = 0;
static char buf[256];
int sigfd, r;
fd_set fds;
- va_list ap;
assert(daemon_signal_fd() >= 0);
@@ -85,6 +85,8 @@
daemon_log(LOG_ERR, "Unable to open /dev/null as STDIN");
_exit(EXIT_FAILURE);
}
+
+ daemon_close_all(-1);
umask(0022); /* Set up a sane umask */
@@ -93,12 +95,10 @@
chdir("/");
}
- va_start(ap, prog);
for (i = 0; i < MAX_ARGS-1; i++)
if (!(args[i] = va_arg(ap, char*)))
break;
args[i] = NULL;
- va_end(ap);
execv(prog, args);
@@ -128,7 +128,6 @@
return -1;
}
-
if (FD_ISSET(p[0], &qfds)) {
char c;
@@ -190,3 +189,14 @@
}
}
}
+
+int daemon_exec(const char *dir, int *ret, const char *prog, ...) {
+ va_list ap;
+ int r;
+
+ va_start(ap, prog);
+ r = daemon_execv(dir, ret, prog, ap);
+ va_end(ap);
+
+ return r;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dexec.h new/libdaemon-0.11/libdaemon/dexec.h
--- old/libdaemon-0.10/libdaemon/dexec.h 2005-11-18 21:31:37.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dexec.h 2007-06-11 17:41:47.000000000 +0200
@@ -22,6 +22,8 @@
* 02110-1301 USA
*/
+#include
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -35,12 +37,19 @@
/** This variable is defined to 1 iff daemon_exec() is supported.*/
#define DAEMON_EXEC_AVAILABLE 1
+#if defined(__GNUC__) && ! defined(DAEMON_GCC_SENTINEL)
+/** A macro for making use of GCCs printf compilation warnings */
+#define DAEMON_GCC_SENTINEL __attribute__ ((sentinel))
+#else
+#define DAEMON_GCC_SENTINEL
+#endif
+
/** Run the specified executable with the specified arguments in the
* specified directory and return the return value of the program in
* the specified pointer. The calling process is blocked until the
* child finishes and all child output (either STDOUT or STDIN) has
* been written to syslog. Running this function requires that
- * daemon_siginal() has been called with SIGCHLD as argument.
+ * daemon_signal() has been called with SIGCHLD as argument.
*
* @param dir Working directory for the process.
* @param ret A pointer to an integer to write the return value of the program to.
@@ -48,8 +57,14 @@
* @param ... The arguments to be passed to the program, followed by a (char *) NULL
* @return Nonzero on failure, zero on success
*/
-int daemon_exec(const char *dir, int *ret, const char *prog, ...);
+int daemon_exec(const char *dir, int *ret, const char *prog, ...) DAEMON_GCC_SENTINEL;
+
+/** This variable is defined to 1 iff daemon_execv() is supported.*/
+#define DAEMON_EXECV_AVAILABLE 1
+/** The same as daemon_exec, but without variadic arguments */
+int daemon_execv(const char *dir, int *ret, const char *prog, va_list ap);
+
#ifdef __cplusplus
}
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dfork.c new/libdaemon-0.11/libdaemon/dfork.c
--- old/libdaemon-0.10/libdaemon/dfork.c 2005-11-18 21:39:54.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dfork.c 2007-06-11 17:36:11.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: dfork.c 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: dfork.c 118 2007-06-11 15:36:10Z lennart $ */
/*
* This file is part of libdaemon.
@@ -36,6 +36,8 @@
#include
#include
#include
+#include
+#include
#include "dfork.h"
#include "dnonblock.h"
@@ -199,30 +201,29 @@
goto fail;
} else if (pid == 0) {
- int tty_fd;
+ int tty_fd;
/* Second child */
if (daemon_log_use & DAEMON_LOG_AUTO)
daemon_log_use = DAEMON_LOG_SYSLOG;
- signal(SIGTTOU, SIG_IGN);
- signal(SIGTTIN, SIG_IGN);
- signal(SIGTSTP, SIG_IGN);
-
- setsid();
- setpgid(0,0);
+ signal(SIGTTOU, SIG_IGN);
+ signal(SIGTTIN, SIG_IGN);
+ signal(SIGTSTP, SIG_IGN);
+
+ setsid();
+ setpgid(0,0);
#ifdef TIOCNOTTY
- if ((tty_fd = open("/dev/tty", O_RDWR)) >= 0) {
- ioctl(tty_fd, TIOCNOTTY, NULL);
- close(tty_fd);
- }
+ if ((tty_fd = open("/dev/tty", O_RDWR)) >= 0) {
+ ioctl(tty_fd, TIOCNOTTY, NULL);
+ close(tty_fd);
+ }
#endif
dpid = getpid();
if (atomic_write(pipe_fds[1], &dpid, sizeof(dpid)) != sizeof(dpid))
goto fail;
close(pipe_fds[1]);
-
return 0;
} else {
@@ -279,6 +280,11 @@
int daemon_retval_send(int i) {
ssize_t r;
+ if (_daemon_retval_pipe[1] < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
r = atomic_write(_daemon_retval_pipe[1], &i, sizeof(i));
daemon_retval_done();
@@ -287,8 +293,10 @@
if (r < 0)
daemon_log(LOG_ERR, "write() failed while writing return value to pipe: %s", strerror(errno));
- else
+ else {
daemon_log(LOG_ERR, "write() too short while writing return value from pipe");
+ errno = EINVAL;
+ }
return -1;
}
@@ -315,8 +323,10 @@
if (s < 0)
daemon_log(LOG_ERR, "select() failed while waiting for return value: %s", strerror(errno));
- else
+ else {
+ errno = ETIMEDOUT;
daemon_log(LOG_ERR, "Timeout reached while wating for return value");
+ }
return -1;
}
@@ -326,10 +336,13 @@
if (r < 0)
daemon_log(LOG_ERR, "read() failed while reading return value from pipe: %s", strerror(errno));
- else if (r == 0)
+ else if (r == 0) {
daemon_log(LOG_ERR, "read() failed with EOF while reading return value from pipe.");
- else if (r > 0)
+ errno = EINVAL;
+ } else if (r > 0) {
daemon_log(LOG_ERR, "read() too short while reading return value from pipe.");
+ errno = EINVAL;
+ }
return -1;
}
@@ -339,3 +352,117 @@
return i;
}
+int daemon_close_all(int except_fd, ...) {
+ va_list original_ap, ap;
+ int n, i, r;
+ int *p;
+
+ va_start(original_ap, except_fd);
+ va_copy(ap, original_ap);
+
+ for (n = 0; va_arg(ap, int) >= 0; n++)
+ ;
+
+ va_end(ap);
+
+ if (!(p = malloc(sizeof(int) * (n+1)))) {
+ va_end(original_ap);
+ return -1;
+ }
+
+ i = 0;
+ while ((p[i++] = va_arg(original_ap, int)) >= 0)
+ ;
+
+ p[i] = -1;
+
+ r = daemon_close_allv(p);
+ free(p);
+
+ return r;
+}
+
+/** Same as daemon_close_all but takes an array of fds, terminated by -1 */
+int daemon_close_allv(const int except_fds[]) {
+ struct rlimit rl;
+ int fd;
+
+#ifdef __linux__
+
+ DIR *d;
+
+ if ((d = opendir("/proc/self/fd"))) {
+
+ struct dirent *de;
+
+ while ((de = readdir(d))) {
+ long l;
+ char *e = NULL;
+ int i, fd;
+
+ if (de->d_name[0] == '.')
+ continue;
+
+ errno = 0;
+ l = strtol(de->d_name, &e, 10);
+ if (errno != 0 || !e || *e) {
+ closedir(d);
+ errno = EINVAL;
+ return -1;
+ }
+
+ fd = (int) l;
+
+ if ((long) fd != l) {
+ closedir(d);
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (fd <= 3)
+ continue;
+
+ if (fd == dirfd(d))
+ continue;
+
+ if (fd == _daemon_retval_pipe[1])
+ continue;
+
+ for (i = 0; except_fds[i] >= 0; i++)
+ if (except_fds[i] == fd)
+ continue;
+
+ if (close(fd) < 0) {
+ closedir(d);
+ return -1;
+ }
+ }
+
+ closedir(d);
+ return 0;
+ }
+
+#endif
+
+ if (getrlimit(RLIMIT_NOFILE, &rl) < 0)
+ return -1;
+
+ for (fd = 0; fd < (int) rl.rlim_max; fd++) {
+ int i;
+
+ if (fd <= 3)
+ continue;
+
+ if (fd == _daemon_retval_pipe[1])
+ continue;
+
+ for (i = 0; except_fds[i] >= 0; i++)
+ if (except_fds[i] == fd)
+ continue;
+
+ if (close(fd) < 0 && errno != EBADF)
+ return -1;
+ }
+
+ return 0;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dfork.h new/libdaemon-0.11/libdaemon/dfork.h
--- old/libdaemon-0.10/libdaemon/dfork.h 2005-11-19 19:17:01.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dfork.h 2007-06-11 17:41:47.000000000 +0200
@@ -1,7 +1,7 @@
#ifndef foodaemonforkhfoo
#define foodaemonforkhfoo
-/* $Id: dfork.h 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: dfork.h 116 2007-06-11 15:16:09Z lennart $ */
/*
* This file is part of libdaemon.
@@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
/** \mainpage libdaemon
*
* libdaemon
@@ -100,6 +100,13 @@
*/
int daemon_retval_send(int s);
+/** Close all file descriptors except those passed. List needs to be
+ * terminated by -1. FDs 0, 1, 2 will be kept open anyway. */
+int daemon_close_all(int except_fd, ...);
+
+/** Same as daemon_close_all but takes an array of fds, terminated by -1 */
+int daemon_close_allv(const int except_fds[]);
+
#ifdef __cplusplus
}
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dlog.c new/libdaemon-0.11/libdaemon/dlog.c
--- old/libdaemon-0.10/libdaemon/dlog.c 2005-11-24 14:44:19.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dlog.c 2007-06-11 17:34:47.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: dlog.c 109 2005-11-24 13:44:19Z lennart $ */
+/* $Id: dlog.c 117 2007-06-11 15:34:47Z lennart $ */
/*
* This file is part of libdaemon.
@@ -26,16 +26,18 @@
#include
#include
#include
+#include
#include "dlog.h"
enum daemon_log_flags daemon_log_use = DAEMON_LOG_AUTO|DAEMON_LOG_STDERR;
const char* daemon_log_ident = NULL;
-void daemon_log(int prio, const char* template, ...) {
- va_list arglist;
- va_start(arglist, template);
-
+void daemon_logv(int prio, const char* template, va_list arglist) {
+ int saved_errno;
+
+ saved_errno = errno;
+
if (daemon_log_use & DAEMON_LOG_SYSLOG) {
openlog(daemon_log_ident ? daemon_log_ident : "UNKNOWN", LOG_PID, LOG_DAEMON);
vsyslog(prio | LOG_DAEMON, template, arglist);
@@ -51,7 +53,14 @@
fprintf(stdout, "\n");
}
+ errno = saved_errno;
+}
+
+void daemon_log(int prio, const char* template, ...) {
+ va_list arglist;
+ va_start(arglist, template);
+ daemon_logv(prio, template, arglist);
va_end(arglist);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dlog.h new/libdaemon-0.11/libdaemon/dlog.h
--- old/libdaemon-0.10/libdaemon/dlog.h 2005-11-18 21:39:54.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dlog.h 2007-06-11 17:42:47.000000000 +0200
@@ -1,7 +1,7 @@
#ifndef foodaemonloghfoo
#define foodaemonloghfoo
-/* $Id: dlog.h 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: dlog.h 120 2007-06-11 15:42:47Z lennart $ */
/*
* This file is part of libdaemon.
@@ -23,6 +23,7 @@
*/
#include
+#include
#ifdef __cplusplus
extern "C" {
@@ -51,7 +52,7 @@
* to set this to a sensible value or generate your own. */
extern const char* daemon_log_ident;
-#ifdef __GNUC__
+#if defined(__GNUC__) && ! defined(DAEMON_GCC_PRINTF_ATTR)
/** A macro for making use of GCCs printf compilation warnings */
#define DAEMON_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
#else
@@ -64,6 +65,12 @@
*/
void daemon_log(int prio, const char* t, ...) DAEMON_GCC_PRINTF_ATTR(2,3);
+/** This variable is defined to 1 iff daemon_logv() is supported.*/
+#define DAEMON_LOGV_AVAILABLE 1
+
+/** Same as daemon_logv, but without variadic arguments */
+void daemon_logv(int prio, const char* t, va_list ap);
+
/** Return a sensible syslog identification for daemon_log_ident
* generated from argv[0]. This will return a pointer to the file name
* of argv[0], i.e. strrchr(argv[0], '\')+1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dpid.c new/libdaemon-0.11/libdaemon/dpid.c
--- old/libdaemon-0.10/libdaemon/dpid.c 2005-11-18 21:39:54.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dpid.c 2007-06-22 17:09:47.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: dpid.c 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: dpid.c 125 2007-06-22 15:09:47Z lennart $ */
/*
* This file is part of libdaemon.
@@ -44,6 +44,10 @@
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 512
+#endif
+
#define VARRUN "/var/run"
const char *daemon_pid_file_ident = NULL;
@@ -78,9 +82,13 @@
int fd = -1, locked = -1;
pid_t ret = (pid_t) -1, pid;
ssize_t l;
+ long lpid;
+ char *e = NULL;
- if (!(fn = daemon_pid_file_proc()))
+ if (!(fn = daemon_pid_file_proc())) {
+ errno = EINVAL;
goto finish;
+ }
if ((fd = open(fn, O_RDWR, 0644)) < 0) {
if (errno != ENOENT)
@@ -99,16 +107,24 @@
}
txt[l] = 0;
+ txt[strcspn(txt, "\r\n")] = 0;
+
+ errno = 0;
+ lpid = strtol(txt, &e, 10);
+ pid = (pid_t) lpid;
- if ((pid = (pid_t) atoi(txt)) <= 0) {
+ if (errno != 0 || !e || *e || (long) pid != lpid) {
daemon_log(LOG_WARNING, "PID file corrupt, removing. (%s)", fn);
unlink(fn);
+ errno = EINVAL;
goto finish;
}
if (kill(pid, 0) != 0 && errno != EPERM) {
+ int saved_errno = errno;
daemon_log(LOG_WARNING, "Process %lu died: %s; removing PID file. (%s)", (unsigned long) pid, strerror(errno), fn);
unlink(fn);
+ errno = saved_errno;
goto finish;
}
@@ -117,8 +133,10 @@
finish:
if (fd >= 0) {
+ int saved_errno = errno;
if (locked >= 0)
lock_file(fd, 0);
+ errno = saved_errno;
close(fd);
}
@@ -180,24 +198,30 @@
u = umask(022);
- if (!(fn = daemon_pid_file_proc()))
+ if (!(fn = daemon_pid_file_proc())) {
+ errno = EINVAL;
goto finish;
+ }
if ((fd = open(fn, O_CREAT|O_RDWR|O_EXCL, 0644)) < 0) {
- fprintf(stderr, "open(%s): %s", fn, strerror(errno));
+ daemon_log(LOG_ERR, "open(%s): %s", fn, strerror(errno));
goto finish;
}
if ((locked = lock_file(fd, 1)) < 0) {
+ int saved_errno = errno;
unlink(fn);
+ errno = saved_errno;
goto finish;
}
snprintf(t, sizeof(t), "%lu\n", (unsigned long) getpid());
if (write(fd, t, l = strlen(t)) != l) {
+ int saved_errno = errno;
daemon_log(LOG_WARNING, "write(): %s", strerror(errno));
unlink(fn);
+ errno = saved_errno;
goto finish;
}
@@ -206,10 +230,13 @@
finish:
if (fd >= 0) {
+ int saved_errno = errno;
+
if (locked >= 0)
lock_file(fd, 0);
close(fd);
+ errno = saved_errno;
}
umask(u);
@@ -220,8 +247,10 @@
int daemon_pid_file_remove(void) {
const char *fn;
- if (!(fn = daemon_pid_file_proc()))
+ if (!(fn = daemon_pid_file_proc())) {
+ errno = EINVAL;
return -1;
+ }
if (unlink(fn) < 0)
return -1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/dsignal.c new/libdaemon-0.11/libdaemon/dsignal.c
--- old/libdaemon-0.10/libdaemon/dsignal.c 2005-11-18 21:39:54.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/dsignal.c 2007-06-11 17:34:47.000000000 +0200
@@ -1,4 +1,4 @@
-/* $Id: dsignal.c 101 2005-11-18 20:39:12Z lennart $ */
+/* $Id: dsignal.c 117 2007-06-11 15:34:47Z lennart $ */
/*
* This file is part of libdaemon.
@@ -50,7 +50,6 @@
if (daemon_nonblock(_signal_pipe[0], 1) < 0 || daemon_nonblock(_signal_pipe[1], 1) < 0)
return -1;
-
}
return 0;
@@ -69,7 +68,7 @@
}
if (sigaddset(&ss, s) < 0) {
- daemon_log(LOG_ERR, "sigaddyset(): %s", strerror(errno));
+ daemon_log(LOG_ERR, "sigaddset(): %s", strerror(errno));
return -1;
}
@@ -111,8 +110,7 @@
}
va_end(ap);
-
-
+
return r;
}
@@ -132,8 +130,7 @@
if ((r = read(_signal_pipe[0], &s, sizeof(s))) == sizeof(s))
return s;
-
-
+
if (r < 0) {
if (errno == EAGAIN)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon/Makefile.am new/libdaemon-0.11/libdaemon/Makefile.am
--- old/libdaemon-0.10/libdaemon/Makefile.am 2005-11-24 14:38:53.000000000 +0100
+++ new/libdaemon-0.11/libdaemon/Makefile.am 2007-06-11 17:46:06.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 108 2005-11-24 13:38:53Z lennart $
+# $Id: Makefile.am 122 2007-06-11 15:46:06Z lennart $
#
# This file is part of libdaemon.
#
@@ -38,4 +38,4 @@
daemon.h \
$(pkg_include_HEADERS)
-libdaemon_la_LDFLAGS = -version-info 2:4:2
+libdaemon_la_LDFLAGS = -version-info 3:0:3
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/libdaemon.spec new/libdaemon-0.11/libdaemon.spec
--- old/libdaemon-0.10/libdaemon.spec 2005-11-24 14:46:40.000000000 +0100
+++ new/libdaemon-0.11/libdaemon.spec 2007-06-22 17:08:29.000000000 +0200
@@ -2,7 +2,7 @@
Summary: lightweight C library which eases the writing of UNIX daemons.
Name: libdaemon
-Version: 0.10
+Version: 0.11
Release: 1
URL: http://www.stud.uni-hamburg.de/users/lennart/projects/libdaemon
Source: %{name}-%{version}.tar.gz
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libdaemon-0.10/README new/libdaemon-0.11/README
--- old/libdaemon-0.10/README 2005-11-24 14:56:11.000000000 +0100
+++ new/libdaemon-0.11/README 2007-06-22 17:09:14.000000000 +0200
@@ -1,5 +1,4 @@
-
- libdaemon 0.10
+ libdaemon 0.11
Copyright 2003-2005 Lennart Poettering
@@ -15,15 +14,15 @@
License
- This library is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+ General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
@@ -32,56 +31,65 @@
News
+ Fri Jun 22 2007:
+
+ [10]Version 0.11 released; changes include: automatically detect
+ whether lynx is installed; properly set errno on every error condition;
+ add new function daemon_close_all() to close all open file descriptors
+ except a given set; add daemon_logv(), which is identical to
+ daemon_log(), but takes a va_list argument; add daemon_execv() in
+ similar style; other fixes
+
Thu Nov 24 2005:
- [10]Version 0.10 released; changes include: make logging compatible
+ [11]Version 0.10 released; changes include: make logging compatible
with daemons running in a chroot() environment
Fri Nov 18 2005:
- [11]Version 0.9 released; changes include: portability (FreeBSD,
+ [12]Version 0.9 released; changes include: portability (FreeBSD,
NetBSD, OpenBSD, Darwin, Solaris, Cygwin); some minor header file
cleanups; fix access mode of PID files; other cleanups; license change
from GPL to LGPL
Sat Jun 4 2005:
- [12]Version 0.8 released; changes include: proper PID file locking
+ [13]Version 0.8 released; changes include: proper PID file locking
Sat Dec 18 2004:
- [13]Version 0.7 released; changes include: minor cleanups; C++
+ [14]Version 0.7 released; changes include: minor cleanups; C++
compatibility; gcc 2.95 compatiblity
Wed Apr 7 2004:
- [14]Version 0.6 released; changes include: backgrounding fixes, minor
+ [15]Version 0.6 released; changes include: backgrounding fixes, minor
other stuff
Tue Feb 10 2004:
- [15]Version 0.5 released; changes include: signal handling fix,
- forking fix
+ [16]Version 0.5 released; changes include: signal handling fix, forking
+ fix
Sat Jan 10 2004:
- [16]Version 0.4 released; changes include: new module dexec.c; added
+ [17]Version 0.4 released; changes include: new module dexec.c; added
pkg-config support.
Mon Oct 20 2003:
- [17]Version 0.3 released; changes include: documentation update, build
+ [18]Version 0.3 released; changes include: documentation update, build
fixes, RPM spec file added, added new function int
daemon_pid_file_kill_wait().
Thu July 10 2003:
- [18]Version 0.2 released; changes include: ugly umask error fix,
+ [19]Version 0.2 released; changes include: ugly umask error fix,
documentation update
Mon July 7 2003:
- [19]Version 0.1 released
+ [20]Version 0.1 released
Overview
@@ -100,16 +108,16 @@
APIs like these are used in most daemon software available. It is not
that simple to get it done right and code duplication is not a goal.
- libdaemon is currently used by [20]ifplugd, [21]Avahi, [22]ivam2,
- [23]Nautilus-Share and [24]aeswepd.
+ libdaemon is currently used by [21]ifplugd, [22]Avahi, [23]ivam2,
+ [24]Nautilus-Share and [25]aeswepd.
Current Status
- Version 0.10 is feature complete.
+ Version 0.11 is feature complete.
Documentation
- An extensive API reference is [25]available
+ An extensive API reference is [26]available
Requirements
@@ -138,23 +146,23 @@
Download
The newest release is always available from
- [26]http://0pointer.de/lennart/projects/libdaemon/
+ [27]http://0pointer.de/lennart/projects/libdaemon/
- Get libdaemon's development sources from the [27]Subversion
- [28]repository ([29]viewcvs):
+ Get libdaemon's development sources from the [28]Subversion
+ [29]repository ([30]viewcvs):
svn checkout svn://svn.0pointer.de/libdaemon/trunk libdaemon
You may find an up to date Debian package of libdaemon on the
- [30]Debian package repository.
+ [31]Debian package repository.
If you want to be notified whenever I release a new version of this
- software use the subscription feature of [31]Freshmeat.
- _________________________________________________________________
+ software use the subscription feature of [32]Freshmeat.
+ __________________________________________________________________
- Lennart Poettering , November 2005
+ Lennart Poettering , June 2007
- $Id: README.html.in 110 2005-11-24 13:56:04Z lennart $
+ $Id: README.html.in 124 2007-06-22 15:07:50Z lennart $
References
@@ -167,25 +175,26 @@
7. README#installation
8. README#acks
9. README#download
- 10. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz
- 11. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.9.tar.gz
- 12. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.8.tar.gz
- 13. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.7.tar.gz
- 14. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.6.tar.gz
- 15. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.5.tar.gz
- 16. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.4.tar.gz
- 17. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.3.tar.gz
- 18. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.2.tar.gz
- 19. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.1.tar.gz
- 20. http://0pointer.de/lennart/projects/ifplugd/
- 21. http://freedesktop.org/Software/Avahi
- 22. http://0pointer.de/lennart/projects/ivam2/
- 23. http://gentoo.ovibes.net/nautilus-share/mediawiki-1.4.4/index.php/Accueil
- 24. http://0pointer.de/lennart/projects/aeswepd/
- 25. reference/html/index.html
- 26. http://0pointer.de/lennart/projects/libdaemon/
- 27. http://subversion.tigris.org/
- 28. svn://svn.0pointer.de/libdaemon
- 29. http://0pointer.de/cgi-bin/viewcvs.cgi/?root=libdaemon
- 30. http://packages.debian.org/libdaemon0
- 31. http://freshmeat.net/projects/libdaemon/
+ 10. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.11.tar.gz
+ 11. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.10.tar.gz
+ 12. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.9.tar.gz
+ 13. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.8.tar.gz
+ 14. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.7.tar.gz
+ 15. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.6.tar.gz
+ 16. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.5.tar.gz
+ 17. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.4.tar.gz
+ 18. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.3.tar.gz
+ 19. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.2.tar.gz
+ 20. http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.1.tar.gz
+ 21. http://0pointer.de/lennart/projects/ifplugd/
+ 22. http://freedesktop.org/Software/Avahi
+ 23. http://0pointer.de/lennart/projects/ivam2/
+ 24. http://gentoo.ovibes.net/nautilus-share/mediawiki-1.4.4/index.php/Accueil
+ 25. http://0pointer.de/lennart/projects/aeswepd/
+ 26. reference/html/index.html
+ 27. http://0pointer.de/lennart/projects/libdaemon/
+ 28. http://subversion.tigris.org/
+ 29. svn://svn.0pointer.de/libdaemon
+ 30. http://0pointer.de/cgi-bin/viewcvs.cgi/?root=libdaemon
+ 31. http://packages.debian.org/libdaemon0
+ 32. http://freshmeat.net/projects/libdaemon/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org