Skip to content

Commit 088f10e

Browse files
committed
0.6.2 (20040102)
- Fixed bug: --stop during spawn delay wasn't acted upon - Fixed API bug: <slack/lib.h> didn't include <slack/coproc.h> - Fixed bug: -lm wasn't in `libslack-config --libs` on Solaris - Changed --restart: reset spawn burst counters (for stodden at peppermind.de) - Changed daemon_path_is_safe() to give an explanation when unsafe - Added explanations when rejecting unsafe config files and executables - Fixed bug: reset agent state to IDLE when interrupted (bte at kamash.com) - Trim unquoted leading spaces from property values (with bte at kamash.com) - Also trim only unquoted trailing spaces from property names - Added tools/migrate-properties utility (preserves old propfile behaviour) - Fixed bug: ownership partially lost in map_resize (with bte at kamash.com) - Fixed bug: mem_resize was broken since libslack-0.4 (bte at kamash.com) - Fixed DOC bug: stated the importance of including <slack/lib.h> first - Cleaned up error messages (now that prog name is set to --name argument) - Added sections to libslack(3) features list (coproc+pty, low level api) - Fixed bug: if select() failed (unlikely), coproc wasn't closed properly - Fixed bug: when tty_raw() failed (unlikely), it returned the wrong value - Added many examples to the manpages (there are now 91 runnable examples) - Added tools/check-examples to verify that all examples work - Fixed bug: str_fgetline() returned empty string rather than null on eof - Fixed bug: cstrstr() didn't always work due to a typo - Added sections to libslack(3) features list (documentation, testing) - Added intel solaris8 binary package - Ported to Mac OS X (Darwin) 10.3.2 - Added make osx osx-daemon osx-slack (macosx binary packages) - Added pid to --running output (requested by rubinson at email.arizona.edu) - Dropped support for K&R clients (suggested by skaller at ozemail.com.au) - Added hsort_closure(3) (suggested by skaller at maxtal.com.au) - Added make slack.swig (generate a SWIG input file for libslack)
1 parent d3c88bf commit 088f10e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+5532
-2022
lines changed

Makefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# daemon - http://libslack.org/daemon/
33
#
4-
# Copyright (C) 1999-2001 raf <raf@raf.org>
4+
# Copyright (C) 1999-2004 raf <raf@raf.org>
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
1919
# or visit http://www.gnu.org/copyleft/gpl.html
2020
#
2121

22-
# 20030901 raf <raf@raf.org>
22+
# 20040102 raf <raf@raf.org>
2323

2424
CC := gcc
2525
# CC := cc
@@ -29,7 +29,7 @@ POD2MAN := pod2man
2929
POD2HTML := pod2html
3030
GZIP := gzip -f -9
3131

32-
DESTDIR :=
32+
DESTDIR :=
3333
PREFIX := $(DESTDIR)/usr/local
3434
APP_INSDIR := $(PREFIX)/bin
3535
LIB_INSDIR := $(PREFIX)/lib
@@ -60,7 +60,7 @@ DAEMON_INCDIRS := libslack
6060
DAEMON_LIBDIRS := libslack
6161
include $(DAEMON_SRCDIR)/macros.mk
6262

63-
.PHONY: all ready test check man html install uninstall dist rpm deb sol obsd fbsd
63+
.PHONY: all ready test check man html install uninstall dist rpm deb sol obsd fbsd osx
6464

6565
all: ready $(ALL_TARGETS)
6666
ready: $(READY_TARGETS)
@@ -75,6 +75,7 @@ deb: $(DEB_TARGETS)
7575
sol: $(SOL_TARGETS)
7676
obsd: $(OBSD_TARGETS)
7777
fbsd: $(FBSD_TARGETS)
78+
osx: $(OSX_TARGETS)
7879

7980
.PHONY: help help-macros depend clean clobber distclean
8081

@@ -102,6 +103,7 @@ help::
102103
echo " sol -- makes binary solaris package"; \
103104
echo " obsd -- makes binary openbsd package"; \
104105
echo " fbsd -- makes binary freebsd package"; \
106+
echo " osx -- makes binary macosx package"; \
105107
echo
106108

107109
help-macros::
@@ -137,7 +139,9 @@ help-macros::
137139
echo "RPM_TARGETS = $(RPM_TARGETS)"; \
138140
echo "DEB_TARGETS = $(DEB_TARGETS)"; \
139141
echo "SOL_TARGETS = $(SOL_TARGETS)"; \
140-
echo "BSD_TARGETS = $(BSD_TARGETS)"; \
142+
echo "OBSD_TARGETS = $(OBSD_TARGETS)"; \
143+
echo "FBSD_TARGETS = $(FBSD_TARGETS)"; \
144+
echo "OSX_TARGETS = $(OSX_TARGETS)"; \
141145
echo
142146

143147
tags: $(TAG_FILES)

README

Lines changed: 77 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,16 @@ INSTALL
105105
~~~~~~~
106106
Currently, this is only known to work on the following systems:
107107

108-
Linux 2.2/2.4 (Redhat 6.x/7.x, Debian 2.2r6/3.0r0)
109-
Solaris 2.6/8 (sun, x86)
110-
OpenBSD 2.9/3.1
111-
FreeBSD 4.5
112-
113-
Compiling on Solaris 2.6 requires running conf/solaris6-cc (If you have the
114-
Sun WorkShop C compiler) or conf/solaris6-gcc (If you have gcc) in the source
115-
directory. If you have Solaris 8, run the conf/solaris8-[g]cc scripts
116-
instead. Compiling on OpenBSD requires running conf/openbsd. Compiling on
117-
FreeBSD requires running conf/freebsd. It is ready to compile on Linux as
118-
distributed so it is not necessary to run conf/linux.
119-
120-
There isn't a real configure script yet so you will no doubt encounter
108+
Linux 2.2/2.4 (intel, Redhat 6.x/7.x/9, Debian 2.2r6/3.0r0)
109+
Solaris 2.6/8 (sparc, intel)
110+
OpenBSD 2.9/3.1 (intel)
111+
FreeBSD 4.5 (intel)
112+
Mac OS X (Darwin) 10.3.2 (G4)
113+
114+
For these systems, just run the "config" script in the source directory. It
115+
will run the appropriate script in the "conf" directory for the current host.
116+
117+
Note: There isn't a real configure script yet so you will no doubt encounter
121118
problems on other systems. An ISO C and POSIX/XPG4 environment will help
122119
greatly. If your system doesn't have snprintf(3), GNU getopt_long(3),
123120
vsscanf(3), strcasecmp(3), strncasecmp(3), strlcpy(3) or strlcat(3),
@@ -144,16 +141,16 @@ they have some very nasty bugs.
144141

145142
First, uninstall any previous version:
146143

147-
cd /usr/local/src/daemon-0.6
144+
cd /usr/local/src/daemon-0.6.1
148145
make uninstall
149146

150147
To build and test:
151148

152-
tar xzf daemon-0.6.1.tar.gz
153-
cd daemon-0.6.1
154-
conf/<your-system> # i.e. linux, solaris[68]-[g]cc, openbsd, freebsd
155-
mak # must be gnu make
156-
make test # only tests libslack. to test daemon, see test/README
149+
tar xzf daemon-0.6.2.tar.gz
150+
cd daemon-0.6.2
151+
./config # iff linux, solaris, openbsd, freebsd or macosx
152+
make # must be gnu make
153+
make test # only tests libslack. to test daemon, see test/README
157154

158155
To install daemon and its manpage (in /usr/local by default):
159156

@@ -194,28 +191,38 @@ BINARY PACKAGES
194191
~~~~~~~~~~~~~~~
195192
To install from the RPM binary package (into /usr by default):
196193

197-
rpm -i daemon-0.6.1-1.i386.rpm
194+
rpm -i daemon-0.6.2-1.i386.rpm
198195

199196
To install from the RPM binary package into somewhere other than /usr:
200197

201-
rpm --prefix=/usr/local -i daemon-0.6.1-1.i386.rpm
198+
rpm --prefix=/usr/local -i daemon-0.6.2-1.i386.rpm
202199

203200
To install from the (relocatable) Debian binary package (into /usr):
204201

205-
dpkg -i daemon_0.6.1-0_i386.deb
206-
207-
To install from the (relocatable) Solaris8 binary package (into /opt/daemon):
208-
209-
gunzip daemon-0.6.1.sun4u.pkg.gz
210-
pkgadd -d daemon-0.6.1.sun4u.pkg
202+
dpkg -i daemon_0.6.2-0_i386.deb # you should really use apt-get
211203

212204
Install from the OpenBSD binary package (into /usr/local):
213205

214-
pkg_add daemon-0.6.1-obsd-i386.tar.gz
206+
pkg_add daemon-0.6.2-obsd-i386.tar.gz
215207

216208
Install from the FreeBSD binary package (into /usr/local):
217209

218-
pkg_add daemon-0.6.1-fbsd-i386.tar.gz
210+
pkg_add daemon-0.6.2-fbsd-i386.tar.gz
211+
212+
Install from the (relocatable) Mac OS X binary package (into /usr/local):
213+
214+
cd /usr/local
215+
tar xzf /usr/local/src/daemon-0.6.2-osx-powerpc.tar.gz
216+
217+
To install from the (relocatable) Solaris8 binary package (into /opt/daemon):
218+
219+
gunzip daemon-0.6.2.sun4u.pkg.gz
220+
pkgadd -d daemon-0.6.2.sun4u.pkg
221+
222+
or:
223+
224+
gunzip daemon-0.6.2.i86pc.pkg.gz
225+
pkgadd -d daemon-0.6.2.i86pc.pkg
219226

220227
REQUIREMENTS
221228
~~~~~~~~~~~~
@@ -275,10 +282,14 @@ FreeBSD
275282
Has the same UNIX domain datagram socket problem as Solaris.
276283
Can't lock fifos so fifo_open() can't guarantee a unique reader.
277284

285+
Mac OS X
286+
~~~~~~~~
287+
Probably has the same UNIX domain datagram problem as Solaris.
288+
278289
COPYING
279290
~~~~~~~
280291
daemon - turns other processes into daemons
281-
Copyright (C) 1999-2002 raf <raf@raf.org>
292+
Copyright (C) 1999-2004 raf <raf@raf.org>
282293

283294
This program is free software; you can redistribute it and/or modify
284295
it under the terms of the GNU General Public License as published by
@@ -296,7 +307,7 @@ Copyright (C) 1999-2002 raf <raf@raf.org>
296307
or visit http://www.gnu.org/copyleft/gpl.html
297308

298309
libslack - A UNIX/C library of general utilities for programmers with Slack
299-
Copyright (C) 1999-2002 raf <raf@raf.org>
310+
Copyright (C) 1999-2004 raf <raf@raf.org>
300311

301312
This library is free software; you can redistribute it and/or modify
302313
it under the terms of the GNU General Public License as published by
@@ -328,7 +339,7 @@ All rights reserved.
328339
documentation and/or other materials provided with the distribution.
329340
3. The name of the author may not be used to endorse or promote products
330341
derived from this software without specific prior written permission.
331-
342+
332343
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
333344
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
334345
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -698,22 +709,51 @@ HISTORY
698709
- Fixed bug: exit too quickly on sigterm (spotted by stodden@cs.tum.edu)
699710
- Set prog name to --name argument, if any (for syslog message prefix)
700711

712+
0.6.2 (20040102)
713+
- Fixed bug: --stop during spawn delay wasn't acted upon
714+
- Fixed API bug: <slack/lib.h> didn't include <slack/coproc.h>
715+
- Fixed bug: -lm wasn't in `libslack-config --libs` on Solaris
716+
- Changed --restart: reset spawn burst counters (for stodden@peppermind.de)
717+
- Changed daemon_path_is_safe() to give an explanation when unsafe
718+
- Added explanations when rejecting unsafe config files and executables
719+
- Fixed bug: reset agent state to IDLE when interrupted (bte@kamash.com)
720+
- Trim unquoted leading spaces from property values (with bte@kamash.com)
721+
- Also trim only unquoted trailing spaces from property names
722+
- Added tools/migrate-properties utility (preserves old propfile behaviour)
723+
- Fixed bug: ownership partially lost in map_resize (with bte@kamash.com)
724+
- Fixed bug: mem_resize was broken since libslack-0.4 (bte@kamash.com)
725+
- Fixed DOC bug: stated the importance of including <slack/lib.h> first
726+
- Cleaned up error messages (now that prog name is set to --name argument)
727+
- Added sections to libslack(3) features list (coproc+pty, low level api)
728+
- Fixed bug: if select() failed (unlikely), coproc wasn't closed properly
729+
- Fixed bug: when tty_raw() failed (unlikely), it returned the wrong value
730+
- Added many examples to the manpages (there are now 91 runnable examples)
731+
- Added tools/check-examples to verify that all examples work
732+
- Fixed bug: str_fgetline() returned empty string rather than null on eof
733+
- Fixed bug: cstrstr() didn't always work due to a typo
734+
- Added sections to libslack(3) features list (documentation, testing)
735+
- Added intel solaris8 binary package
736+
- Ported to Mac OS X (Darwin) 10.3.2
737+
- Added make osx osx-daemon osx-slack (macosx binary packages)
738+
- Added pid to --running output (requested by rubinson@email.arizona.edu)
739+
- Dropped support for K&R clients (suggested by skaller@ozemail.com.au)
740+
- Added hsort_closure(3) (suggested by skaller@maxtal.com.au)
741+
- Added make slack.swig (generate a SWIG input file for libslack)
742+
701743
TODO
702744
~~~~
703-
- Port to Mac OS X (again), NetBSD, Cygwin[?]
745+
- Port to NetBSD, Cygwin[?]
704746
- Decouple memory type and allocation strategy from List/Map/String code
705747
- Check out/incorporate Kiem-Phong Vo's error handling architecture [?]
706748
- Use autoconf and libtool (then add devel/static/dynamic packages)
707-
- Add sub libraries (str/list/map, daemon/net/agent, mtdisc, memdisc) [?]
708749
- Add debian source package creation for libslack (after libtool)
709750
- Make sure net module interoperates with openssl
710751
- Add scan/print money/numbers/dates/times according to a locale [?]
711-
- Add bitstring module
752+
- Add bitstring module [?]
712753
- Write Scalable Makefiles paper
713754
- Write fast/slow lane paper (requires access to a gigabit network)
714-
- Add more examples to the manpages
715755

716756
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
717757
URL: http://libslack.org/daemon/
718-
Date: 20030901
758+
Date: 20040102
719759
Author: raf <raf@raf.org>

conf/freebsd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# daemon - http://libslack.org/daemon/
44
#
5-
# Copyright (C) 1999-2001 raf <raf@raf.org>
5+
# Copyright (C) 1999-2004 raf <raf@raf.org>
66
#
77
# This program is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
2222

2323
# Modify Makefile, macros.mk and config.h to compile on FreeBSD
2424
#
25-
# 20030901 raf <raf@raf.org>
25+
# 20040102 raf <raf@raf.org>
2626

2727
perl -pi \
2828
-e 's/^(\S+ \+= xnet)$/# $1/;' \
@@ -55,6 +55,7 @@ perl -pi \
5555
-e 's/^\/\* #undef (NO_POSIX_SOURCE) \*\/$/#define $1 1/;' \
5656
-e 's/^\/\* #undef (NO_XOPEN_SOURCE) \*\/$/#define $1 1/;' \
5757
-e 's/^\/\* #undef (HAVE_STDARG_H) \*\/$/#define $1 1/;' \
58+
-e 's/^#define (HAVE_STDINT_H) 1$/\/\* #undef $1 \*\//;' \
5859
-e 's/^\/\* #undef (HAVE_POLL_H) \*\/$/#define $1 1/;' \
5960
-e 's/^\/\* #undef (HAVE_SYS_POLL_H) \*\/$/#define $1 1/;' \
6061
-e 's/^\/\* #undef (HAVE_SYS_SELECT_H) \*\/$/#define $1 1/;' \
@@ -120,5 +121,6 @@ perl -pi \
120121
-e 's/^#define (HAVE_TTYNAME_R) 1$/\/* #undef $1 *\//;' \
121122
-e 's/^\/\* #undef (HAVE_PTSNAME_R) \*\/$/#define $1 1/;' \
122123
-e 's/^\/\* #undef (HAVE_PTSNAME) \*\/$/#define $1 1/;' \
124+
-e 's/^#define (HAVE_POLL_THAT_ABORTS_WHEN_POLLFDS_IS_NULL) 1$/\/* #undef $1 *\//;' \
123125
`find . -name config.h`
124126

conf/linux

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# daemon - http://libslack.org/daemon/
44
#
5-
# Copyright (C) 1999-2001 raf <raf@raf.org>
5+
# Copyright (C) 1999-2004 raf <raf@raf.org>
66
#
77
# This program is free software; you can redistribute it and/or modify
88
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
2222

2323
# Modify Makefile, macros.mk and config.h to compile on Linux
2424
#
25-
# 20030901 raf <raf@raf.org>
25+
# 20040102 raf <raf@raf.org>
2626

2727
perl -pi \
2828
-e 's/^(\S+ \+= xnet)$/# $1/;' \
@@ -55,6 +55,7 @@ perl -pi \
5555
-e 's/^#define (NO_POSIX_SOURCE) 1$/\/* #undef $1 *\//;' \
5656
-e 's/^#define (NO_XOPEN_SOURCE) 1$/\/* #undef $1 *\//;' \
5757
-e 's/^\/\* #undef (HAVE_STDARG_H) \*\/$/#define $1 1/;' \
58+
-e 's/^#define (HAVE_STDINT_H) 1$/\/\* #undef $1 \*\//;' \
5859
-e 's/^\/\* #undef (HAVE_POLL_H) \*\/$/#define $1 1/;' \
5960
-e 's/^\/\* #undef (HAVE_SYS_POLL_H) \*\/$/#define $1 1/;' \
6061
-e 's/^\/\* #undef (HAVE_SYS_SELECT_H) \*\/$/#define $1 1/;' \
@@ -120,5 +121,6 @@ perl -pi \
120121
-e 's/^\/\* #undef (HAVE_TTYNAME_R) \*\/$/#define $1 1/;' \
121122
-e 's/^\/\* #undef (HAVE_PTSNAME_R) \*\/$/#define $1 1/;' \
122123
-e 's/^\/\* #undef (HAVE_PTSNAME) \*\/$/#define $1 1/;' \
124+
-e 's/^#define (HAVE_POLL_THAT_ABORTS_WHEN_POLLFDS_IS_NULL) 1$/\/* #undef $1 *\//;' \
123125
`find . -name config.h`
124126

0 commit comments

Comments
 (0)