diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-12-18 22:22:54 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-12-18 22:22:54 +0000 |
commit | c73f5e4e6922363cc7cbf4f39f236e310845f9b9 (patch) | |
tree | 22711d070b1bf3e473b2a41ba1ee5dbba2772923 /src | |
parent | feb9b77fc7a598f756734b3224a5acd4b5463f7d (diff) |
* build system update
* doxygen update
* add some SVN tags to some files
* gcc 2.95 compatiblity
* remove some compilation warnings
* fix testd
git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@69 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 27 | ||||
-rw-r--r-- | src/dfork.c | 12 | ||||
-rw-r--r-- | src/dfork.h | 2 | ||||
-rw-r--r-- | src/dlog.c | 2 | ||||
-rw-r--r-- | src/dlog.h | 2 | ||||
-rw-r--r-- | src/dnonblock.c | 2 | ||||
-rw-r--r-- | src/dnonblock.h | 2 | ||||
-rw-r--r-- | src/dpid.c | 2 | ||||
-rw-r--r-- | src/dpid.h | 2 | ||||
-rw-r--r-- | src/dsignal.c | 2 | ||||
-rw-r--r-- | src/dsignal.h | 5 |
11 files changed, 46 insertions, 14 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a4bebbd..c14000c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,16 +18,25 @@ AM_CFLAGS=-D_GNU_SOURCE -pkginclude_HEADERS = dlog.h dfork.h dsignal.h dnonblock.h dpid.h dexec.h daemon.h +pkginclude_HEADERS = \ + dlog.h \ + dfork.h \ + dsignal.h \ + dnonblock.h \ + dpid.h \ + dexec.h \ + daemon.h lib_LTLIBRARIES = libdaemon.la libdaemon_la_SOURCES = \ - dlog.c dlog.h \ - dfork.c dfork.h \ - dsignal.c dsignal.h \ - dnonblock.c dnonblock.h \ - dpid.c dpid.h \ - dexec.c dexec.h \ - daemon.h -libdaemon_la_LDFLAGS = -version-info 2:0:2 + dlog.c \ + dfork.c \ + dsignal.c \ + dnonblock.c \ + dpid.c \ + dexec.c \ + daemon.h \ + $(pkg_include_HEADERS) + +libdaemon_la_LDFLAGS = -version-info 2:1:2 diff --git a/src/dfork.c b/src/dfork.c index b795dc6..2fa9f30 100644 --- a/src/dfork.c +++ b/src/dfork.c @@ -73,7 +73,7 @@ static ssize_t atomic_read(int fd, void *d, size_t l) { } t += r; - d += r; + d = (char*) d + r; l -= r; } @@ -95,7 +95,7 @@ static ssize_t atomic_write(int fd, const void *d, size_t l) { } t += r; - d += r; + d = (char*) d + r; l -= r; } @@ -212,7 +212,7 @@ pid_t daemon_fork(void) { setpgrp(); if ((tty_fd = open("/dev/tty", O_RDWR)) >= 0) { - ioctl(tty_fd, TIOCNOTTY, (char*) 0); + ioctl(tty_fd, TIOCNOTTY, NULL); close(tty_fd); } @@ -300,9 +300,13 @@ int daemon_retval_wait(int timeout) { int i; if (timeout > 0) { - struct timeval tv = { timeout, 0 }; + struct timeval tv; int s; fd_set fds; + + tv.tv_sec = timeout; + tv.tv_usec = 0; + FD_ZERO(&fds); FD_SET(_daemon_retval_pipe[0], &fds); diff --git a/src/dfork.h b/src/dfork.h index 01b97b4..faac652 100644 --- a/src/dfork.h +++ b/src/dfork.h @@ -1,6 +1,8 @@ #ifndef foodaemonforkhfoo #define foodaemonforkhfoo +/* $Id$ */ + /* * This file is part of libdaemon. * @@ -1,3 +1,5 @@ +/* $Id$ */ + /* * This file is part of libdaemon. * @@ -1,6 +1,8 @@ #ifndef foodaemonloghfoo #define foodaemonloghfoo +/* $Id$ */ + /* * This file is part of libdaemon. * diff --git a/src/dnonblock.c b/src/dnonblock.c index a5e6073..6c50279 100644 --- a/src/dnonblock.c +++ b/src/dnonblock.c @@ -1,3 +1,5 @@ +/* $Id$ */ + /* * This file is part of libdaemon. * diff --git a/src/dnonblock.h b/src/dnonblock.h index 6cb362b..16efa25 100644 --- a/src/dnonblock.h +++ b/src/dnonblock.h @@ -1,6 +1,8 @@ #ifndef foodaemonnonblockhfoo #define foodaemonnonblockhfoo +/* $Id$ */ + /* * This file is part of libdaemon. * @@ -1,3 +1,5 @@ +/* $Id$ */ + /* * This file is part of libdaemon. * @@ -1,6 +1,8 @@ #ifndef foodaemonpidhfoo #define foodaemonpidhfoo +/* $Id$ */ + /* * This file is part of libdaemon. * diff --git a/src/dsignal.c b/src/dsignal.c index 0eb11a2..2eafc0c 100644 --- a/src/dsignal.c +++ b/src/dsignal.c @@ -1,3 +1,5 @@ +/* $Id$ */ + /* * This file is part of libdaemon. * diff --git a/src/dsignal.h b/src/dsignal.h index c777bb7..ef3342c 100644 --- a/src/dsignal.h +++ b/src/dsignal.h @@ -1,6 +1,9 @@ #ifndef foodaemonsignalhfoo #define foodaemonsignalhfoo +/* $Id$ */ + + /* * This file is part of libdaemon. * @@ -37,7 +40,7 @@ extern "C" { */ /** Installs signal handlers for the specified signals - * @param s, ... The signals to install handlers for. The list should be terminated by -1 + * @param s, ... The signals to install handlers for. The list should be terminated by 0 * @return zero on success, nonzero on failure */ int daemon_signal_init(int s, ...); |